webpackJsonp([1,3],{

/***/ 1057:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(437);
__webpack_require__(443);
__webpack_require__(435);
__webpack_require__(442);
__webpack_require__(441);
__webpack_require__(439);
__webpack_require__(440);
__webpack_require__(438);
module.exports = __webpack_require__(436);


/***/ },

/***/ 435:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(735))

/***/ },

/***/ 436:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(736))

/***/ },

/***/ 437:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(737))

/***/ },

/***/ 438:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(738))

/***/ },

/***/ 439:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(758))

/***/ },

/***/ 440:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(759))

/***/ },

/***/ 441:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(760))

/***/ },

/***/ 442:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(761))

/***/ },

/***/ 443:
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(64)(__webpack_require__(762))

/***/ },

/***/ 64:
/***/ function(module, exports) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
module.exports = function(src) {
	if (typeof execScript !== "undefined")
		execScript(src);
	else
		eval.call(null, src);
}


/***/ },

/***/ 735:
/***/ function(module, exports) {

module.exports = "/*!\n * Bootstrap v4.0.0-alpha.5 (https://getbootstrap.com)\n * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\nif (typeof jQuery === 'undefined') {\n  throw new Error('Bootstrap\\'s JavaScript requires jQuery')\n}\n\n+function ($) {\n  var version = $.fn.jquery.split(' ')[0].split('.')\n  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {\n    throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n  }\n}(jQuery);\n\n\n+function () {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Util = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Private TransitionEnd Helpers\n   * ------------------------------------------------------------------------\n   */\n\n  var transition = false;\n\n  var MAX_UID = 1000000;\n\n  var TransitionEndEvent = {\n    WebkitTransition: 'webkitTransitionEnd',\n    MozTransition: 'transitionend',\n    OTransition: 'oTransitionEnd otransitionend',\n    transition: 'transitionend'\n  };\n\n  // shoutout AngusCroll (https://goo.gl/pxwQGp)\n  function toType(obj) {\n    return {}.toString.call(obj).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n  }\n\n  function isElement(obj) {\n    return (obj[0] || obj).nodeType;\n  }\n\n  function getSpecialTransitionEndEvent() {\n    return {\n      bindType: transition.end,\n      delegateType: transition.end,\n      handle: function handle(event) {\n        if ($(event.target).is(this)) {\n          return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params\n        }\n        return undefined;\n      }\n    };\n  }\n\n  function transitionEndTest() {\n    if (window.QUnit) {\n      return false;\n    }\n\n    var el = document.createElement('bootstrap');\n\n    for (var name in TransitionEndEvent) {\n      if (el.style[name] !== undefined) {\n        return { end: TransitionEndEvent[name] };\n      }\n    }\n\n    return false;\n  }\n\n  function transitionEndEmulator(duration) {\n    var _this = this;\n\n    var called = false;\n\n    $(this).one(Util.TRANSITION_END, function () {\n      called = true;\n    });\n\n    setTimeout(function () {\n      if (!called) {\n        Util.triggerTransitionEnd(_this);\n      }\n    }, duration);\n\n    return this;\n  }\n\n  function setTransitionEndSupport() {\n    transition = transitionEndTest();\n\n    $.fn.emulateTransitionEnd = transitionEndEmulator;\n\n    if (Util.supportsTransitionEnd()) {\n      $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();\n    }\n  }\n\n  /**\n   * --------------------------------------------------------------------------\n   * Public Util Api\n   * --------------------------------------------------------------------------\n   */\n\n  var Util = {\n\n    TRANSITION_END: 'bsTransitionEnd',\n\n    getUID: function getUID(prefix) {\n      do {\n        /* eslint-disable no-bitwise */\n        prefix += ~~(Math.random() * MAX_UID); // \"~~\" acts like a faster Math.floor() here\n        /* eslint-enable no-bitwise */\n      } while (document.getElementById(prefix));\n      return prefix;\n    },\n    getSelectorFromElement: function getSelectorFromElement(element) {\n      var selector = element.getAttribute('data-target');\n\n      if (!selector) {\n        selector = element.getAttribute('href') || '';\n        selector = /^#[a-z]/i.test(selector) ? selector : null;\n      }\n\n      return selector;\n    },\n    reflow: function reflow(element) {\n      new Function('bs', 'return bs')(element.offsetHeight);\n    },\n    triggerTransitionEnd: function triggerTransitionEnd(element) {\n      $(element).trigger(transition.end);\n    },\n    supportsTransitionEnd: function supportsTransitionEnd() {\n      return Boolean(transition);\n    },\n    typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {\n      for (var property in configTypes) {\n        if (configTypes.hasOwnProperty(property)) {\n          var expectedTypes = configTypes[property];\n          var value = config[property];\n          var valueType = void 0;\n\n          if (value && isElement(value)) {\n            valueType = 'element';\n          } else {\n            valueType = toType(value);\n          }\n\n          if (!new RegExp(expectedTypes).test(valueType)) {\n            throw new Error(componentName.toUpperCase() + ': ' + ('Option \"' + property + '\" provided type \"' + valueType + '\" ') + ('but expected type \"' + expectedTypes + '\".'));\n          }\n        }\n      }\n    }\n  };\n\n  setTransitionEndSupport();\n\n  return Util;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Alert = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'alert';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.alert';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var TRANSITION_DURATION = 150;\n\n  var Selector = {\n    DISMISS: '[data-dismiss=\"alert\"]'\n  };\n\n  var Event = {\n    CLOSE: 'close' + EVENT_KEY,\n    CLOSED: 'closed' + EVENT_KEY,\n    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY\n  };\n\n  var ClassName = {\n    ALERT: 'alert',\n    FADE: 'fade',\n    IN: 'in'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Alert = function () {\n    function Alert(element) {\n      _classCallCheck(this, Alert);\n\n      this._element = element;\n    }\n\n    // getters\n\n    // public\n\n    Alert.prototype.close = function close(element) {\n      element = element || this._element;\n\n      var rootElement = this._getRootElement(element);\n      var customEvent = this._triggerCloseEvent(rootElement);\n\n      if (customEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      this._removeElement(rootElement);\n    };\n\n    Alert.prototype.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY);\n      this._element = null;\n    };\n\n    // private\n\n    Alert.prototype._getRootElement = function _getRootElement(element) {\n      var selector = Util.getSelectorFromElement(element);\n      var parent = false;\n\n      if (selector) {\n        parent = $(selector)[0];\n      }\n\n      if (!parent) {\n        parent = $(element).closest('.' + ClassName.ALERT)[0];\n      }\n\n      return parent;\n    };\n\n    Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {\n      var closeEvent = $.Event(Event.CLOSE);\n\n      $(element).trigger(closeEvent);\n      return closeEvent;\n    };\n\n    Alert.prototype._removeElement = function _removeElement(element) {\n      $(element).removeClass(ClassName.IN);\n\n      if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {\n        this._destroyElement(element);\n        return;\n      }\n\n      $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);\n    };\n\n    Alert.prototype._destroyElement = function _destroyElement(element) {\n      $(element).detach().trigger(Event.CLOSED).remove();\n    };\n\n    // static\n\n    Alert._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var $element = $(this);\n        var data = $element.data(DATA_KEY);\n\n        if (!data) {\n          data = new Alert(this);\n          $element.data(DATA_KEY, data);\n        }\n\n        if (config === 'close') {\n          data[config](this);\n        }\n      });\n    };\n\n    Alert._handleDismiss = function _handleDismiss(alertInstance) {\n      return function (event) {\n        if (event) {\n          event.preventDefault();\n        }\n\n        alertInstance.close(this);\n      };\n    };\n\n    _createClass(Alert, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }]);\n\n    return Alert;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Alert._jQueryInterface;\n  $.fn[NAME].Constructor = Alert;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Alert._jQueryInterface;\n  };\n\n  return Alert;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Button = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'button';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.button';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n\n  var ClassName = {\n    ACTIVE: 'active',\n    BUTTON: 'btn',\n    FOCUS: 'focus'\n  };\n\n  var Selector = {\n    DATA_TOGGLE_CARROT: '[data-toggle^=\"button\"]',\n    DATA_TOGGLE: '[data-toggle=\"buttons\"]',\n    INPUT: 'input',\n    ACTIVE: '.active',\n    BUTTON: '.btn'\n  };\n\n  var Event = {\n    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,\n    FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Button = function () {\n    function Button(element) {\n      _classCallCheck(this, Button);\n\n      this._element = element;\n    }\n\n    // getters\n\n    // public\n\n    Button.prototype.toggle = function toggle() {\n      var triggerChangeEvent = true;\n      var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];\n\n      if (rootElement) {\n        var input = $(this._element).find(Selector.INPUT)[0];\n\n        if (input) {\n          if (input.type === 'radio') {\n            if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {\n              triggerChangeEvent = false;\n            } else {\n              var activeElement = $(rootElement).find(Selector.ACTIVE)[0];\n\n              if (activeElement) {\n                $(activeElement).removeClass(ClassName.ACTIVE);\n              }\n            }\n          }\n\n          if (triggerChangeEvent) {\n            input.checked = !$(this._element).hasClass(ClassName.ACTIVE);\n            $(this._element).trigger('change');\n          }\n\n          input.focus();\n        }\n      } else {\n        this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));\n      }\n\n      if (triggerChangeEvent) {\n        $(this._element).toggleClass(ClassName.ACTIVE);\n      }\n    };\n\n    Button.prototype.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY);\n      this._element = null;\n    };\n\n    // static\n\n    Button._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY);\n\n        if (!data) {\n          data = new Button(this);\n          $(this).data(DATA_KEY, data);\n        }\n\n        if (config === 'toggle') {\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Button, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }]);\n\n    return Button;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {\n    event.preventDefault();\n\n    var button = event.target;\n\n    if (!$(button).hasClass(ClassName.BUTTON)) {\n      button = $(button).closest(Selector.BUTTON);\n    }\n\n    Button._jQueryInterface.call($(button), 'toggle');\n  }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {\n    var button = $(event.target).closest(Selector.BUTTON)[0];\n    $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));\n  });\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Button._jQueryInterface;\n  $.fn[NAME].Constructor = Button;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Button._jQueryInterface;\n  };\n\n  return Button;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Carousel = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'carousel';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.carousel';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var TRANSITION_DURATION = 600;\n  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key\n  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key\n\n  var Default = {\n    interval: 5000,\n    keyboard: true,\n    slide: false,\n    pause: 'hover',\n    wrap: true\n  };\n\n  var DefaultType = {\n    interval: '(number|boolean)',\n    keyboard: 'boolean',\n    slide: '(boolean|string)',\n    pause: '(string|boolean)',\n    wrap: 'boolean'\n  };\n\n  var Direction = {\n    NEXT: 'next',\n    PREVIOUS: 'prev'\n  };\n\n  var Event = {\n    SLIDE: 'slide' + EVENT_KEY,\n    SLID: 'slid' + EVENT_KEY,\n    KEYDOWN: 'keydown' + EVENT_KEY,\n    MOUSEENTER: 'mouseenter' + EVENT_KEY,\n    MOUSELEAVE: 'mouseleave' + EVENT_KEY,\n    LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,\n    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY\n  };\n\n  var ClassName = {\n    CAROUSEL: 'carousel',\n    ACTIVE: 'active',\n    SLIDE: 'slide',\n    RIGHT: 'right',\n    LEFT: 'left',\n    ITEM: 'carousel-item'\n  };\n\n  var Selector = {\n    ACTIVE: '.active',\n    ACTIVE_ITEM: '.active.carousel-item',\n    ITEM: '.carousel-item',\n    NEXT_PREV: '.next, .prev',\n    INDICATORS: '.carousel-indicators',\n    DATA_SLIDE: '[data-slide], [data-slide-to]',\n    DATA_RIDE: '[data-ride=\"carousel\"]'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Carousel = function () {\n    function Carousel(element, config) {\n      _classCallCheck(this, Carousel);\n\n      this._items = null;\n      this._interval = null;\n      this._activeElement = null;\n\n      this._isPaused = false;\n      this._isSliding = false;\n\n      this._config = this._getConfig(config);\n      this._element = $(element)[0];\n      this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];\n\n      this._addEventListeners();\n    }\n\n    // getters\n\n    // public\n\n    Carousel.prototype.next = function next() {\n      if (!this._isSliding) {\n        this._slide(Direction.NEXT);\n      }\n    };\n\n    Carousel.prototype.nextWhenVisible = function nextWhenVisible() {\n      // Don't call next when the page isn't visible\n      if (!document.hidden) {\n        this.next();\n      }\n    };\n\n    Carousel.prototype.prev = function prev() {\n      if (!this._isSliding) {\n        this._slide(Direction.PREVIOUS);\n      }\n    };\n\n    Carousel.prototype.pause = function pause(event) {\n      if (!event) {\n        this._isPaused = true;\n      }\n\n      if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {\n        Util.triggerTransitionEnd(this._element);\n        this.cycle(true);\n      }\n\n      clearInterval(this._interval);\n      this._interval = null;\n    };\n\n    Carousel.prototype.cycle = function cycle(event) {\n      if (!event) {\n        this._isPaused = false;\n      }\n\n      if (this._interval) {\n        clearInterval(this._interval);\n        this._interval = null;\n      }\n\n      if (this._config.interval && !this._isPaused) {\n        this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);\n      }\n    };\n\n    Carousel.prototype.to = function to(index) {\n      var _this2 = this;\n\n      this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];\n\n      var activeIndex = this._getItemIndex(this._activeElement);\n\n      if (index > this._items.length - 1 || index < 0) {\n        return;\n      }\n\n      if (this._isSliding) {\n        $(this._element).one(Event.SLID, function () {\n          return _this2.to(index);\n        });\n        return;\n      }\n\n      if (activeIndex === index) {\n        this.pause();\n        this.cycle();\n        return;\n      }\n\n      var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;\n\n      this._slide(direction, this._items[index]);\n    };\n\n    Carousel.prototype.dispose = function dispose() {\n      $(this._element).off(EVENT_KEY);\n      $.removeData(this._element, DATA_KEY);\n\n      this._items = null;\n      this._config = null;\n      this._element = null;\n      this._interval = null;\n      this._isPaused = null;\n      this._isSliding = null;\n      this._activeElement = null;\n      this._indicatorsElement = null;\n    };\n\n    // private\n\n    Carousel.prototype._getConfig = function _getConfig(config) {\n      config = $.extend({}, Default, config);\n      Util.typeCheckConfig(NAME, config, DefaultType);\n      return config;\n    };\n\n    Carousel.prototype._addEventListeners = function _addEventListeners() {\n      if (this._config.keyboard) {\n        $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));\n      }\n\n      if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {\n        $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));\n      }\n    };\n\n    Carousel.prototype._keydown = function _keydown(event) {\n      event.preventDefault();\n\n      if (/input|textarea/i.test(event.target.tagName)) {\n        return;\n      }\n\n      switch (event.which) {\n        case ARROW_LEFT_KEYCODE:\n          this.prev();\n          break;\n        case ARROW_RIGHT_KEYCODE:\n          this.next();\n          break;\n        default:\n          return;\n      }\n    };\n\n    Carousel.prototype._getItemIndex = function _getItemIndex(element) {\n      this._items = $.makeArray($(element).parent().find(Selector.ITEM));\n      return this._items.indexOf(element);\n    };\n\n    Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) {\n      var isNextDirection = direction === Direction.NEXT;\n      var isPrevDirection = direction === Direction.PREVIOUS;\n      var activeIndex = this._getItemIndex(activeElement);\n      var lastItemIndex = this._items.length - 1;\n      var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;\n\n      if (isGoingToWrap && !this._config.wrap) {\n        return activeElement;\n      }\n\n      var delta = direction === Direction.PREVIOUS ? -1 : 1;\n      var itemIndex = (activeIndex + delta) % this._items.length;\n\n      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];\n    };\n\n    Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, directionalClassname) {\n      var slideEvent = $.Event(Event.SLIDE, {\n        relatedTarget: relatedTarget,\n        direction: directionalClassname\n      });\n\n      $(this._element).trigger(slideEvent);\n\n      return slideEvent;\n    };\n\n    Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {\n      if (this._indicatorsElement) {\n        $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);\n\n        var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];\n\n        if (nextIndicator) {\n          $(nextIndicator).addClass(ClassName.ACTIVE);\n        }\n      }\n    };\n\n    Carousel.prototype._slide = function _slide(direction, element) {\n      var _this3 = this;\n\n      var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];\n      var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);\n\n      var isCycling = Boolean(this._interval);\n\n      var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;\n\n      if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {\n        this._isSliding = false;\n        return;\n      }\n\n      var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);\n      if (slideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (!activeElement || !nextElement) {\n        // some weirdness is happening, so we bail\n        return;\n      }\n\n      this._isSliding = true;\n\n      if (isCycling) {\n        this.pause();\n      }\n\n      this._setActiveIndicatorElement(nextElement);\n\n      var slidEvent = $.Event(Event.SLID, {\n        relatedTarget: nextElement,\n        direction: directionalClassName\n      });\n\n      if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {\n\n        $(nextElement).addClass(direction);\n\n        Util.reflow(nextElement);\n\n        $(activeElement).addClass(directionalClassName);\n        $(nextElement).addClass(directionalClassName);\n\n        $(activeElement).one(Util.TRANSITION_END, function () {\n          $(nextElement).removeClass(directionalClassName).removeClass(direction);\n\n          $(nextElement).addClass(ClassName.ACTIVE);\n\n          $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);\n\n          _this3._isSliding = false;\n\n          setTimeout(function () {\n            return $(_this3._element).trigger(slidEvent);\n          }, 0);\n        }).emulateTransitionEnd(TRANSITION_DURATION);\n      } else {\n        $(activeElement).removeClass(ClassName.ACTIVE);\n        $(nextElement).addClass(ClassName.ACTIVE);\n\n        this._isSliding = false;\n        $(this._element).trigger(slidEvent);\n      }\n\n      if (isCycling) {\n        this.cycle();\n      }\n    };\n\n    // static\n\n    Carousel._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY);\n        var _config = $.extend({}, Default, $(this).data());\n\n        if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {\n          $.extend(_config, config);\n        }\n\n        var action = typeof config === 'string' ? config : _config.slide;\n\n        if (!data) {\n          data = new Carousel(this, _config);\n          $(this).data(DATA_KEY, data);\n        }\n\n        if (typeof config === 'number') {\n          data.to(config);\n        } else if (typeof action === 'string') {\n          if (data[action] === undefined) {\n            throw new Error('No method named \"' + action + '\"');\n          }\n          data[action]();\n        } else if (_config.interval) {\n          data.pause();\n          data.cycle();\n        }\n      });\n    };\n\n    Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {\n      var selector = Util.getSelectorFromElement(this);\n\n      if (!selector) {\n        return;\n      }\n\n      var target = $(selector)[0];\n\n      if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {\n        return;\n      }\n\n      var config = $.extend({}, $(target).data(), $(this).data());\n      var slideIndex = this.getAttribute('data-slide-to');\n\n      if (slideIndex) {\n        config.interval = false;\n      }\n\n      Carousel._jQueryInterface.call($(target), config);\n\n      if (slideIndex) {\n        $(target).data(DATA_KEY).to(slideIndex);\n      }\n\n      event.preventDefault();\n    };\n\n    _createClass(Carousel, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }, {\n      key: 'Default',\n      get: function get() {\n        return Default;\n      }\n    }]);\n\n    return Carousel;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);\n\n  $(window).on(Event.LOAD_DATA_API, function () {\n    $(Selector.DATA_RIDE).each(function () {\n      var $carousel = $(this);\n      Carousel._jQueryInterface.call($carousel, $carousel.data());\n    });\n  });\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Carousel._jQueryInterface;\n  $.fn[NAME].Constructor = Carousel;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Carousel._jQueryInterface;\n  };\n\n  return Carousel;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Collapse = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'collapse';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.collapse';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var TRANSITION_DURATION = 600;\n\n  var Default = {\n    toggle: true,\n    parent: ''\n  };\n\n  var DefaultType = {\n    toggle: 'boolean',\n    parent: 'string'\n  };\n\n  var Event = {\n    SHOW: 'show' + EVENT_KEY,\n    SHOWN: 'shown' + EVENT_KEY,\n    HIDE: 'hide' + EVENT_KEY,\n    HIDDEN: 'hidden' + EVENT_KEY,\n    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY\n  };\n\n  var ClassName = {\n    IN: 'in',\n    COLLAPSE: 'collapse',\n    COLLAPSING: 'collapsing',\n    COLLAPSED: 'collapsed'\n  };\n\n  var Dimension = {\n    WIDTH: 'width',\n    HEIGHT: 'height'\n  };\n\n  var Selector = {\n    ACTIVES: '.card > .in, .card > .collapsing',\n    DATA_TOGGLE: '[data-toggle=\"collapse\"]'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Collapse = function () {\n    function Collapse(element, config) {\n      _classCallCheck(this, Collapse);\n\n      this._isTransitioning = false;\n      this._element = element;\n      this._config = this._getConfig(config);\n      this._triggerArray = $.makeArray($('[data-toggle=\"collapse\"][href=\"#' + element.id + '\"],' + ('[data-toggle=\"collapse\"][data-target=\"#' + element.id + '\"]')));\n\n      this._parent = this._config.parent ? this._getParent() : null;\n\n      if (!this._config.parent) {\n        this._addAriaAndCollapsedClass(this._element, this._triggerArray);\n      }\n\n      if (this._config.toggle) {\n        this.toggle();\n      }\n    }\n\n    // getters\n\n    // public\n\n    Collapse.prototype.toggle = function toggle() {\n      if ($(this._element).hasClass(ClassName.IN)) {\n        this.hide();\n      } else {\n        this.show();\n      }\n    };\n\n    Collapse.prototype.show = function show() {\n      var _this4 = this;\n\n      if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {\n        return;\n      }\n\n      var actives = void 0;\n      var activesData = void 0;\n\n      if (this._parent) {\n        actives = $.makeArray($(Selector.ACTIVES));\n        if (!actives.length) {\n          actives = null;\n        }\n      }\n\n      if (actives) {\n        activesData = $(actives).data(DATA_KEY);\n        if (activesData && activesData._isTransitioning) {\n          return;\n        }\n      }\n\n      var startEvent = $.Event(Event.SHOW);\n      $(this._element).trigger(startEvent);\n      if (startEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (actives) {\n        Collapse._jQueryInterface.call($(actives), 'hide');\n        if (!activesData) {\n          $(actives).data(DATA_KEY, null);\n        }\n      }\n\n      var dimension = this._getDimension();\n\n      $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);\n\n      this._element.style[dimension] = 0;\n      this._element.setAttribute('aria-expanded', true);\n\n      if (this._triggerArray.length) {\n        $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);\n      }\n\n      this.setTransitioning(true);\n\n      var complete = function complete() {\n        $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);\n\n        _this4._element.style[dimension] = '';\n\n        _this4.setTransitioning(false);\n\n        $(_this4._element).trigger(Event.SHOWN);\n      };\n\n      if (!Util.supportsTransitionEnd()) {\n        complete();\n        return;\n      }\n\n      var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n      var scrollSize = 'scroll' + capitalizedDimension;\n\n      $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);\n\n      this._element.style[dimension] = this._element[scrollSize] + 'px';\n    };\n\n    Collapse.prototype.hide = function hide() {\n      var _this5 = this;\n\n      if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {\n        return;\n      }\n\n      var startEvent = $.Event(Event.HIDE);\n      $(this._element).trigger(startEvent);\n      if (startEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      var dimension = this._getDimension();\n      var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';\n\n      this._element.style[dimension] = this._element[offsetDimension] + 'px';\n\n      Util.reflow(this._element);\n\n      $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);\n\n      this._element.setAttribute('aria-expanded', false);\n\n      if (this._triggerArray.length) {\n        $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);\n      }\n\n      this.setTransitioning(true);\n\n      var complete = function complete() {\n        _this5.setTransitioning(false);\n        $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);\n      };\n\n      this._element.style[dimension] = '';\n\n      if (!Util.supportsTransitionEnd()) {\n        complete();\n        return;\n      }\n\n      $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);\n    };\n\n    Collapse.prototype.setTransitioning = function setTransitioning(isTransitioning) {\n      this._isTransitioning = isTransitioning;\n    };\n\n    Collapse.prototype.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY);\n\n      this._config = null;\n      this._parent = null;\n      this._element = null;\n      this._triggerArray = null;\n      this._isTransitioning = null;\n    };\n\n    // private\n\n    Collapse.prototype._getConfig = function _getConfig(config) {\n      config = $.extend({}, Default, config);\n      config.toggle = Boolean(config.toggle); // coerce string values\n      Util.typeCheckConfig(NAME, config, DefaultType);\n      return config;\n    };\n\n    Collapse.prototype._getDimension = function _getDimension() {\n      var hasWidth = $(this._element).hasClass(Dimension.WIDTH);\n      return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;\n    };\n\n    Collapse.prototype._getParent = function _getParent() {\n      var _this6 = this;\n\n      var parent = $(this._config.parent)[0];\n      var selector = '[data-toggle=\"collapse\"][data-parent=\"' + this._config.parent + '\"]';\n\n      $(parent).find(selector).each(function (i, element) {\n        _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);\n      });\n\n      return parent;\n    };\n\n    Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {\n      if (element) {\n        var isOpen = $(element).hasClass(ClassName.IN);\n        element.setAttribute('aria-expanded', isOpen);\n\n        if (triggerArray.length) {\n          $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);\n        }\n      }\n    };\n\n    // static\n\n    Collapse._getTargetFromElement = function _getTargetFromElement(element) {\n      var selector = Util.getSelectorFromElement(element);\n      return selector ? $(selector)[0] : null;\n    };\n\n    Collapse._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var $this = $(this);\n        var data = $this.data(DATA_KEY);\n        var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);\n\n        if (!data && _config.toggle && /show|hide/.test(config)) {\n          _config.toggle = false;\n        }\n\n        if (!data) {\n          data = new Collapse(this, _config);\n          $this.data(DATA_KEY, data);\n        }\n\n        if (typeof config === 'string') {\n          if (data[config] === undefined) {\n            throw new Error('No method named \"' + config + '\"');\n          }\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Collapse, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }, {\n      key: 'Default',\n      get: function get() {\n        return Default;\n      }\n    }]);\n\n    return Collapse;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n    event.preventDefault();\n\n    var target = Collapse._getTargetFromElement(this);\n    var data = $(target).data(DATA_KEY);\n    var config = data ? 'toggle' : $(this).data();\n\n    Collapse._jQueryInterface.call($(target), config);\n  });\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Collapse._jQueryInterface;\n  $.fn[NAME].Constructor = Collapse;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Collapse._jQueryInterface;\n  };\n\n  return Collapse;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Dropdown = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'dropdown';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.dropdown';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key\n  var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key\n  var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key\n  var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)\n\n  var Event = {\n    HIDE: 'hide' + EVENT_KEY,\n    HIDDEN: 'hidden' + EVENT_KEY,\n    SHOW: 'show' + EVENT_KEY,\n    SHOWN: 'shown' + EVENT_KEY,\n    CLICK: 'click' + EVENT_KEY,\n    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,\n    KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY\n  };\n\n  var ClassName = {\n    BACKDROP: 'dropdown-backdrop',\n    DISABLED: 'disabled',\n    OPEN: 'open'\n  };\n\n  var Selector = {\n    BACKDROP: '.dropdown-backdrop',\n    DATA_TOGGLE: '[data-toggle=\"dropdown\"]',\n    FORM_CHILD: '.dropdown form',\n    ROLE_MENU: '[role=\"menu\"]',\n    ROLE_LISTBOX: '[role=\"listbox\"]',\n    NAVBAR_NAV: '.navbar-nav',\n    VISIBLE_ITEMS: '[role=\"menu\"] li:not(.disabled) a, ' + '[role=\"listbox\"] li:not(.disabled) a'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Dropdown = function () {\n    function Dropdown(element) {\n      _classCallCheck(this, Dropdown);\n\n      this._element = element;\n\n      this._addEventListeners();\n    }\n\n    // getters\n\n    // public\n\n    Dropdown.prototype.toggle = function toggle() {\n      if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n        return false;\n      }\n\n      var parent = Dropdown._getParentFromElement(this);\n      var isActive = $(parent).hasClass(ClassName.OPEN);\n\n      Dropdown._clearMenus();\n\n      if (isActive) {\n        return false;\n      }\n\n      if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {\n\n        // if mobile we use a backdrop because click events don't delegate\n        var dropdown = document.createElement('div');\n        dropdown.className = ClassName.BACKDROP;\n        $(dropdown).insertBefore(this);\n        $(dropdown).on('click', Dropdown._clearMenus);\n      }\n\n      var relatedTarget = { relatedTarget: this };\n      var showEvent = $.Event(Event.SHOW, relatedTarget);\n\n      $(parent).trigger(showEvent);\n\n      if (showEvent.isDefaultPrevented()) {\n        return false;\n      }\n\n      this.focus();\n      this.setAttribute('aria-expanded', 'true');\n\n      $(parent).toggleClass(ClassName.OPEN);\n      $(parent).trigger($.Event(Event.SHOWN, relatedTarget));\n\n      return false;\n    };\n\n    Dropdown.prototype.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY);\n      $(this._element).off(EVENT_KEY);\n      this._element = null;\n    };\n\n    // private\n\n    Dropdown.prototype._addEventListeners = function _addEventListeners() {\n      $(this._element).on(Event.CLICK, this.toggle);\n    };\n\n    // static\n\n    Dropdown._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY);\n\n        if (!data) {\n          $(this).data(DATA_KEY, data = new Dropdown(this));\n        }\n\n        if (typeof config === 'string') {\n          if (data[config] === undefined) {\n            throw new Error('No method named \"' + config + '\"');\n          }\n          data[config].call(this);\n        }\n      });\n    };\n\n    Dropdown._clearMenus = function _clearMenus(event) {\n      if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {\n        return;\n      }\n\n      var backdrop = $(Selector.BACKDROP)[0];\n      if (backdrop) {\n        backdrop.parentNode.removeChild(backdrop);\n      }\n\n      var toggles = $.makeArray($(Selector.DATA_TOGGLE));\n\n      for (var i = 0; i < toggles.length; i++) {\n        var parent = Dropdown._getParentFromElement(toggles[i]);\n        var relatedTarget = { relatedTarget: toggles[i] };\n\n        if (!$(parent).hasClass(ClassName.OPEN)) {\n          continue;\n        }\n\n        if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(parent, event.target)) {\n          continue;\n        }\n\n        var hideEvent = $.Event(Event.HIDE, relatedTarget);\n        $(parent).trigger(hideEvent);\n        if (hideEvent.isDefaultPrevented()) {\n          continue;\n        }\n\n        toggles[i].setAttribute('aria-expanded', 'false');\n\n        $(parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));\n      }\n    };\n\n    Dropdown._getParentFromElement = function _getParentFromElement(element) {\n      var parent = void 0;\n      var selector = Util.getSelectorFromElement(element);\n\n      if (selector) {\n        parent = $(selector)[0];\n      }\n\n      return parent || element.parentNode;\n    };\n\n    Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {\n      if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {\n        return;\n      }\n\n      event.preventDefault();\n      event.stopPropagation();\n\n      if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n        return;\n      }\n\n      var parent = Dropdown._getParentFromElement(this);\n      var isActive = $(parent).hasClass(ClassName.OPEN);\n\n      if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {\n\n        if (event.which === ESCAPE_KEYCODE) {\n          var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];\n          $(toggle).trigger('focus');\n        }\n\n        $(this).trigger('click');\n        return;\n      }\n\n      var items = $.makeArray($(Selector.VISIBLE_ITEMS));\n\n      items = items.filter(function (item) {\n        return item.offsetWidth || item.offsetHeight;\n      });\n\n      if (!items.length) {\n        return;\n      }\n\n      var index = items.indexOf(event.target);\n\n      if (event.which === ARROW_UP_KEYCODE && index > 0) {\n        // up\n        index--;\n      }\n\n      if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {\n        // down\n        index++;\n      }\n\n      if (index < 0) {\n        index = 0;\n      }\n\n      items[index].focus();\n    };\n\n    _createClass(Dropdown, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }]);\n\n    return Dropdown;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {\n    e.stopPropagation();\n  });\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Dropdown._jQueryInterface;\n  $.fn[NAME].Constructor = Dropdown;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Dropdown._jQueryInterface;\n  };\n\n  return Dropdown;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Modal = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'modal';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.modal';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var TRANSITION_DURATION = 300;\n  var BACKDROP_TRANSITION_DURATION = 150;\n  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key\n\n  var Default = {\n    backdrop: true,\n    keyboard: true,\n    focus: true,\n    show: true\n  };\n\n  var DefaultType = {\n    backdrop: '(boolean|string)',\n    keyboard: 'boolean',\n    focus: 'boolean',\n    show: 'boolean'\n  };\n\n  var Event = {\n    HIDE: 'hide' + EVENT_KEY,\n    HIDDEN: 'hidden' + EVENT_KEY,\n    SHOW: 'show' + EVENT_KEY,\n    SHOWN: 'shown' + EVENT_KEY,\n    FOCUSIN: 'focusin' + EVENT_KEY,\n    RESIZE: 'resize' + EVENT_KEY,\n    CLICK_DISMISS: 'click.dismiss' + EVENT_KEY,\n    KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY,\n    MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY,\n    MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY,\n    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY\n  };\n\n  var ClassName = {\n    SCROLLBAR_MEASURER: 'modal-scrollbar-measure',\n    BACKDROP: 'modal-backdrop',\n    OPEN: 'modal-open',\n    FADE: 'fade',\n    IN: 'in'\n  };\n\n  var Selector = {\n    DIALOG: '.modal-dialog',\n    DATA_TOGGLE: '[data-toggle=\"modal\"]',\n    DATA_DISMISS: '[data-dismiss=\"modal\"]',\n    FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Modal = function () {\n    function Modal(element, config) {\n      _classCallCheck(this, Modal);\n\n      this._config = this._getConfig(config);\n      this._element = element;\n      this._dialog = $(element).find(Selector.DIALOG)[0];\n      this._backdrop = null;\n      this._isShown = false;\n      this._isBodyOverflowing = false;\n      this._ignoreBackdropClick = false;\n      this._originalBodyPadding = 0;\n      this._scrollbarWidth = 0;\n    }\n\n    // getters\n\n    // public\n\n    Modal.prototype.toggle = function toggle(relatedTarget) {\n      return this._isShown ? this.hide() : this.show(relatedTarget);\n    };\n\n    Modal.prototype.show = function show(relatedTarget) {\n      var _this7 = this;\n\n      var showEvent = $.Event(Event.SHOW, {\n        relatedTarget: relatedTarget\n      });\n\n      $(this._element).trigger(showEvent);\n\n      if (this._isShown || showEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      this._isShown = true;\n\n      this._checkScrollbar();\n      this._setScrollbar();\n\n      $(document.body).addClass(ClassName.OPEN);\n\n      this._setEscapeEvent();\n      this._setResizeEvent();\n\n      $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));\n\n      $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {\n        $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) {\n          if ($(event.target).is(_this7._element)) {\n            _this7._ignoreBackdropClick = true;\n          }\n        });\n      });\n\n      this._showBackdrop($.proxy(this._showElement, this, relatedTarget));\n    };\n\n    Modal.prototype.hide = function hide(event) {\n      if (event) {\n        event.preventDefault();\n      }\n\n      var hideEvent = $.Event(Event.HIDE);\n\n      $(this._element).trigger(hideEvent);\n\n      if (!this._isShown || hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      this._isShown = false;\n\n      this._setEscapeEvent();\n      this._setResizeEvent();\n\n      $(document).off(Event.FOCUSIN);\n\n      $(this._element).removeClass(ClassName.IN);\n\n      $(this._element).off(Event.CLICK_DISMISS);\n      $(this._dialog).off(Event.MOUSEDOWN_DISMISS);\n\n      if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {\n\n        $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);\n      } else {\n        this._hideModal();\n      }\n    };\n\n    Modal.prototype.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY);\n\n      $(window).off(EVENT_KEY);\n      $(document).off(EVENT_KEY);\n      $(this._element).off(EVENT_KEY);\n      $(this._backdrop).off(EVENT_KEY);\n\n      this._config = null;\n      this._element = null;\n      this._dialog = null;\n      this._backdrop = null;\n      this._isShown = null;\n      this._isBodyOverflowing = null;\n      this._ignoreBackdropClick = null;\n      this._originalBodyPadding = null;\n      this._scrollbarWidth = null;\n    };\n\n    // private\n\n    Modal.prototype._getConfig = function _getConfig(config) {\n      config = $.extend({}, Default, config);\n      Util.typeCheckConfig(NAME, config, DefaultType);\n      return config;\n    };\n\n    Modal.prototype._showElement = function _showElement(relatedTarget) {\n      var _this8 = this;\n\n      var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);\n\n      if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n        // don't move modals dom position\n        document.body.appendChild(this._element);\n      }\n\n      this._element.style.display = 'block';\n      this._element.removeAttribute('aria-hidden');\n      this._element.scrollTop = 0;\n\n      if (transition) {\n        Util.reflow(this._element);\n      }\n\n      $(this._element).addClass(ClassName.IN);\n\n      if (this._config.focus) {\n        this._enforceFocus();\n      }\n\n      var shownEvent = $.Event(Event.SHOWN, {\n        relatedTarget: relatedTarget\n      });\n\n      var transitionComplete = function transitionComplete() {\n        if (_this8._config.focus) {\n          _this8._element.focus();\n        }\n        $(_this8._element).trigger(shownEvent);\n      };\n\n      if (transition) {\n        $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);\n      } else {\n        transitionComplete();\n      }\n    };\n\n    Modal.prototype._enforceFocus = function _enforceFocus() {\n      var _this9 = this;\n\n      $(document).off(Event.FOCUSIN) // guard against infinite focus loop\n      .on(Event.FOCUSIN, function (event) {\n        if (document !== event.target && _this9._element !== event.target && !$(_this9._element).has(event.target).length) {\n          _this9._element.focus();\n        }\n      });\n    };\n\n    Modal.prototype._setEscapeEvent = function _setEscapeEvent() {\n      var _this10 = this;\n\n      if (this._isShown && this._config.keyboard) {\n        $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {\n          if (event.which === ESCAPE_KEYCODE) {\n            _this10.hide();\n          }\n        });\n      } else if (!this._isShown) {\n        $(this._element).off(Event.KEYDOWN_DISMISS);\n      }\n    };\n\n    Modal.prototype._setResizeEvent = function _setResizeEvent() {\n      if (this._isShown) {\n        $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));\n      } else {\n        $(window).off(Event.RESIZE);\n      }\n    };\n\n    Modal.prototype._hideModal = function _hideModal() {\n      var _this11 = this;\n\n      this._element.style.display = 'none';\n      this._element.setAttribute('aria-hidden', 'true');\n      this._showBackdrop(function () {\n        $(document.body).removeClass(ClassName.OPEN);\n        _this11._resetAdjustments();\n        _this11._resetScrollbar();\n        $(_this11._element).trigger(Event.HIDDEN);\n      });\n    };\n\n    Modal.prototype._removeBackdrop = function _removeBackdrop() {\n      if (this._backdrop) {\n        $(this._backdrop).remove();\n        this._backdrop = null;\n      }\n    };\n\n    Modal.prototype._showBackdrop = function _showBackdrop(callback) {\n      var _this12 = this;\n\n      var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';\n\n      if (this._isShown && this._config.backdrop) {\n        var doAnimate = Util.supportsTransitionEnd() && animate;\n\n        this._backdrop = document.createElement('div');\n        this._backdrop.className = ClassName.BACKDROP;\n\n        if (animate) {\n          $(this._backdrop).addClass(animate);\n        }\n\n        $(this._backdrop).appendTo(document.body);\n\n        $(this._element).on(Event.CLICK_DISMISS, function (event) {\n          if (_this12._ignoreBackdropClick) {\n            _this12._ignoreBackdropClick = false;\n            return;\n          }\n          if (event.target !== event.currentTarget) {\n            return;\n          }\n          if (_this12._config.backdrop === 'static') {\n            _this12._element.focus();\n          } else {\n            _this12.hide();\n          }\n        });\n\n        if (doAnimate) {\n          Util.reflow(this._backdrop);\n        }\n\n        $(this._backdrop).addClass(ClassName.IN);\n\n        if (!callback) {\n          return;\n        }\n\n        if (!doAnimate) {\n          callback();\n          return;\n        }\n\n        $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);\n      } else if (!this._isShown && this._backdrop) {\n        $(this._backdrop).removeClass(ClassName.IN);\n\n        var callbackRemove = function callbackRemove() {\n          _this12._removeBackdrop();\n          if (callback) {\n            callback();\n          }\n        };\n\n        if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {\n          $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);\n        } else {\n          callbackRemove();\n        }\n      } else if (callback) {\n        callback();\n      }\n    };\n\n    // ----------------------------------------------------------------------\n    // the following methods are used to handle overflowing modals\n    // todo (fat): these should probably be refactored out of modal.js\n    // ----------------------------------------------------------------------\n\n    Modal.prototype._handleUpdate = function _handleUpdate() {\n      this._adjustDialog();\n    };\n\n    Modal.prototype._adjustDialog = function _adjustDialog() {\n      var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n      if (!this._isBodyOverflowing && isModalOverflowing) {\n        this._element.style.paddingLeft = this._scrollbarWidth + 'px';\n      }\n\n      if (this._isBodyOverflowing && !isModalOverflowing) {\n        this._element.style.paddingRight = this._scrollbarWidth + 'px';\n      }\n    };\n\n    Modal.prototype._resetAdjustments = function _resetAdjustments() {\n      this._element.style.paddingLeft = '';\n      this._element.style.paddingRight = '';\n    };\n\n    Modal.prototype._checkScrollbar = function _checkScrollbar() {\n      this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;\n      this._scrollbarWidth = this._getScrollbarWidth();\n    };\n\n    Modal.prototype._setScrollbar = function _setScrollbar() {\n      var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);\n\n      this._originalBodyPadding = document.body.style.paddingRight || '';\n\n      if (this._isBodyOverflowing) {\n        document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';\n      }\n    };\n\n    Modal.prototype._resetScrollbar = function _resetScrollbar() {\n      document.body.style.paddingRight = this._originalBodyPadding;\n    };\n\n    Modal.prototype._getScrollbarWidth = function _getScrollbarWidth() {\n      // thx d.walsh\n      var scrollDiv = document.createElement('div');\n      scrollDiv.className = ClassName.SCROLLBAR_MEASURER;\n      document.body.appendChild(scrollDiv);\n      var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n      document.body.removeChild(scrollDiv);\n      return scrollbarWidth;\n    };\n\n    // static\n\n    Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY);\n        var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);\n\n        if (!data) {\n          data = new Modal(this, _config);\n          $(this).data(DATA_KEY, data);\n        }\n\n        if (typeof config === 'string') {\n          if (data[config] === undefined) {\n            throw new Error('No method named \"' + config + '\"');\n          }\n          data[config](relatedTarget);\n        } else if (_config.show) {\n          data.show(relatedTarget);\n        }\n      });\n    };\n\n    _createClass(Modal, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }, {\n      key: 'Default',\n      get: function get() {\n        return Default;\n      }\n    }]);\n\n    return Modal;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n    var _this13 = this;\n\n    var target = void 0;\n    var selector = Util.getSelectorFromElement(this);\n\n    if (selector) {\n      target = $(selector)[0];\n    }\n\n    var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());\n\n    if (this.tagName === 'A') {\n      event.preventDefault();\n    }\n\n    var $target = $(target).one(Event.SHOW, function (showEvent) {\n      if (showEvent.isDefaultPrevented()) {\n        // only register focus restorer if modal will actually get shown\n        return;\n      }\n\n      $target.one(Event.HIDDEN, function () {\n        if ($(_this13).is(':visible')) {\n          _this13.focus();\n        }\n      });\n    });\n\n    Modal._jQueryInterface.call($(target), config, this);\n  });\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Modal._jQueryInterface;\n  $.fn[NAME].Constructor = Modal;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Modal._jQueryInterface;\n  };\n\n  return Modal;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar ScrollSpy = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'scrollspy';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.scrollspy';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n\n  var Default = {\n    offset: 10,\n    method: 'auto',\n    target: ''\n  };\n\n  var DefaultType = {\n    offset: 'number',\n    method: 'string',\n    target: '(string|element)'\n  };\n\n  var Event = {\n    ACTIVATE: 'activate' + EVENT_KEY,\n    SCROLL: 'scroll' + EVENT_KEY,\n    LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY\n  };\n\n  var ClassName = {\n    DROPDOWN_ITEM: 'dropdown-item',\n    DROPDOWN_MENU: 'dropdown-menu',\n    NAV_LINK: 'nav-link',\n    NAV: 'nav',\n    ACTIVE: 'active'\n  };\n\n  var Selector = {\n    DATA_SPY: '[data-spy=\"scroll\"]',\n    ACTIVE: '.active',\n    LIST_ITEM: '.list-item',\n    LI: 'li',\n    LI_DROPDOWN: 'li.dropdown',\n    NAV_LINKS: '.nav-link',\n    DROPDOWN: '.dropdown',\n    DROPDOWN_ITEMS: '.dropdown-item',\n    DROPDOWN_TOGGLE: '.dropdown-toggle'\n  };\n\n  var OffsetMethod = {\n    OFFSET: 'offset',\n    POSITION: 'position'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var ScrollSpy = function () {\n    function ScrollSpy(element, config) {\n      _classCallCheck(this, ScrollSpy);\n\n      this._element = element;\n      this._scrollElement = element.tagName === 'BODY' ? window : element;\n      this._config = this._getConfig(config);\n      this._selector = this._config.target + ' ' + Selector.NAV_LINKS + ',' + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS);\n      this._offsets = [];\n      this._targets = [];\n      this._activeTarget = null;\n      this._scrollHeight = 0;\n\n      $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this));\n\n      this.refresh();\n      this._process();\n    }\n\n    // getters\n\n    // public\n\n    ScrollSpy.prototype.refresh = function refresh() {\n      var _this14 = this;\n\n      var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;\n\n      var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;\n\n      var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;\n\n      this._offsets = [];\n      this._targets = [];\n\n      this._scrollHeight = this._getScrollHeight();\n\n      var targets = $.makeArray($(this._selector));\n\n      targets.map(function (element) {\n        var target = void 0;\n        var targetSelector = Util.getSelectorFromElement(element);\n\n        if (targetSelector) {\n          target = $(targetSelector)[0];\n        }\n\n        if (target && (target.offsetWidth || target.offsetHeight)) {\n          // todo (fat): remove sketch reliance on jQuery position/offset\n          return [$(target)[offsetMethod]().top + offsetBase, targetSelector];\n        }\n        return null;\n      }).filter(function (item) {\n        return item;\n      }).sort(function (a, b) {\n        return a[0] - b[0];\n      }).forEach(function (item) {\n        _this14._offsets.push(item[0]);\n        _this14._targets.push(item[1]);\n      });\n    };\n\n    ScrollSpy.prototype.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY);\n      $(this._scrollElement).off(EVENT_KEY);\n\n      this._element = null;\n      this._scrollElement = null;\n      this._config = null;\n      this._selector = null;\n      this._offsets = null;\n      this._targets = null;\n      this._activeTarget = null;\n      this._scrollHeight = null;\n    };\n\n    // private\n\n    ScrollSpy.prototype._getConfig = function _getConfig(config) {\n      config = $.extend({}, Default, config);\n\n      if (typeof config.target !== 'string') {\n        var id = $(config.target).attr('id');\n        if (!id) {\n          id = Util.getUID(NAME);\n          $(config.target).attr('id', id);\n        }\n        config.target = '#' + id;\n      }\n\n      Util.typeCheckConfig(NAME, config, DefaultType);\n\n      return config;\n    };\n\n    ScrollSpy.prototype._getScrollTop = function _getScrollTop() {\n      return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;\n    };\n\n    ScrollSpy.prototype._getScrollHeight = function _getScrollHeight() {\n      return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);\n    };\n\n    ScrollSpy.prototype._process = function _process() {\n      var scrollTop = this._getScrollTop() + this._config.offset;\n      var scrollHeight = this._getScrollHeight();\n      var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;\n\n      if (this._scrollHeight !== scrollHeight) {\n        this.refresh();\n      }\n\n      if (scrollTop >= maxScroll) {\n        var target = this._targets[this._targets.length - 1];\n\n        if (this._activeTarget !== target) {\n          this._activate(target);\n        }\n      }\n\n      if (this._activeTarget && scrollTop < this._offsets[0]) {\n        this._activeTarget = null;\n        this._clear();\n        return;\n      }\n\n      for (var i = this._offsets.length; i--;) {\n        var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);\n\n        if (isActiveTarget) {\n          this._activate(this._targets[i]);\n        }\n      }\n    };\n\n    ScrollSpy.prototype._activate = function _activate(target) {\n      this._activeTarget = target;\n\n      this._clear();\n\n      var queries = this._selector.split(',');\n      queries = queries.map(function (selector) {\n        return selector + '[data-target=\"' + target + '\"],' + (selector + '[href=\"' + target + '\"]');\n      });\n\n      var $link = $(queries.join(','));\n\n      if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {\n        $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);\n        $link.addClass(ClassName.ACTIVE);\n      } else {\n        // todo (fat) this is kinda sus...\n        // recursively add actives to tested nav-links\n        $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);\n      }\n\n      $(this._scrollElement).trigger(Event.ACTIVATE, {\n        relatedTarget: target\n      });\n    };\n\n    ScrollSpy.prototype._clear = function _clear() {\n      $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);\n    };\n\n    // static\n\n    ScrollSpy._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY);\n        var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config || null;\n\n        if (!data) {\n          data = new ScrollSpy(this, _config);\n          $(this).data(DATA_KEY, data);\n        }\n\n        if (typeof config === 'string') {\n          if (data[config] === undefined) {\n            throw new Error('No method named \"' + config + '\"');\n          }\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(ScrollSpy, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }, {\n      key: 'Default',\n      get: function get() {\n        return Default;\n      }\n    }]);\n\n    return ScrollSpy;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(window).on(Event.LOAD_DATA_API, function () {\n    var scrollSpys = $.makeArray($(Selector.DATA_SPY));\n\n    for (var i = scrollSpys.length; i--;) {\n      var $spy = $(scrollSpys[i]);\n      ScrollSpy._jQueryInterface.call($spy, $spy.data());\n    }\n  });\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = ScrollSpy._jQueryInterface;\n  $.fn[NAME].Constructor = ScrollSpy;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return ScrollSpy._jQueryInterface;\n  };\n\n  return ScrollSpy;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Tab = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'tab';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.tab';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var TRANSITION_DURATION = 150;\n\n  var Event = {\n    HIDE: 'hide' + EVENT_KEY,\n    HIDDEN: 'hidden' + EVENT_KEY,\n    SHOW: 'show' + EVENT_KEY,\n    SHOWN: 'shown' + EVENT_KEY,\n    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY\n  };\n\n  var ClassName = {\n    DROPDOWN_MENU: 'dropdown-menu',\n    ACTIVE: 'active',\n    FADE: 'fade',\n    IN: 'in'\n  };\n\n  var Selector = {\n    A: 'a',\n    LI: 'li',\n    DROPDOWN: '.dropdown',\n    UL: 'ul:not(.dropdown-menu)',\n    FADE_CHILD: '> .nav-item .fade, > .fade',\n    ACTIVE: '.active',\n    ACTIVE_CHILD: '> .nav-item > .active, > .active',\n    DATA_TOGGLE: '[data-toggle=\"tab\"], [data-toggle=\"pill\"]',\n    DROPDOWN_TOGGLE: '.dropdown-toggle',\n    DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Tab = function () {\n    function Tab(element) {\n      _classCallCheck(this, Tab);\n\n      this._element = element;\n    }\n\n    // getters\n\n    // public\n\n    Tab.prototype.show = function show() {\n      var _this15 = this;\n\n      if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {\n        return;\n      }\n\n      var target = void 0;\n      var previous = void 0;\n      var ulElement = $(this._element).closest(Selector.UL)[0];\n      var selector = Util.getSelectorFromElement(this._element);\n\n      if (ulElement) {\n        previous = $.makeArray($(ulElement).find(Selector.ACTIVE));\n        previous = previous[previous.length - 1];\n      }\n\n      var hideEvent = $.Event(Event.HIDE, {\n        relatedTarget: this._element\n      });\n\n      var showEvent = $.Event(Event.SHOW, {\n        relatedTarget: previous\n      });\n\n      if (previous) {\n        $(previous).trigger(hideEvent);\n      }\n\n      $(this._element).trigger(showEvent);\n\n      if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (selector) {\n        target = $(selector)[0];\n      }\n\n      this._activate(this._element, ulElement);\n\n      var complete = function complete() {\n        var hiddenEvent = $.Event(Event.HIDDEN, {\n          relatedTarget: _this15._element\n        });\n\n        var shownEvent = $.Event(Event.SHOWN, {\n          relatedTarget: previous\n        });\n\n        $(previous).trigger(hiddenEvent);\n        $(_this15._element).trigger(shownEvent);\n      };\n\n      if (target) {\n        this._activate(target, target.parentNode, complete);\n      } else {\n        complete();\n      }\n    };\n\n    Tab.prototype.dispose = function dispose() {\n      $.removeClass(this._element, DATA_KEY);\n      this._element = null;\n    };\n\n    // private\n\n    Tab.prototype._activate = function _activate(element, container, callback) {\n      var active = $(container).find(Selector.ACTIVE_CHILD)[0];\n      var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));\n\n      var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);\n\n      if (active && isTransitioning) {\n        $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);\n      } else {\n        complete();\n      }\n\n      if (active) {\n        $(active).removeClass(ClassName.IN);\n      }\n    };\n\n    Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {\n      if (active) {\n        $(active).removeClass(ClassName.ACTIVE);\n\n        var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];\n\n        if (dropdownChild) {\n          $(dropdownChild).removeClass(ClassName.ACTIVE);\n        }\n\n        active.setAttribute('aria-expanded', false);\n      }\n\n      $(element).addClass(ClassName.ACTIVE);\n      element.setAttribute('aria-expanded', true);\n\n      if (isTransitioning) {\n        Util.reflow(element);\n        $(element).addClass(ClassName.IN);\n      } else {\n        $(element).removeClass(ClassName.FADE);\n      }\n\n      if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {\n\n        var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];\n        if (dropdownElement) {\n          $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);\n        }\n\n        element.setAttribute('aria-expanded', true);\n      }\n\n      if (callback) {\n        callback();\n      }\n    };\n\n    // static\n\n    Tab._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var $this = $(this);\n        var data = $this.data(DATA_KEY);\n\n        if (!data) {\n          data = data = new Tab(this);\n          $this.data(DATA_KEY, data);\n        }\n\n        if (typeof config === 'string') {\n          if (data[config] === undefined) {\n            throw new Error('No method named \"' + config + '\"');\n          }\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Tab, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }]);\n\n    return Tab;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n    event.preventDefault();\n    Tab._jQueryInterface.call($(this), 'show');\n  });\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Tab._jQueryInterface;\n  $.fn[NAME].Constructor = Tab;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Tab._jQueryInterface;\n  };\n\n  return Tab;\n}(jQuery);\n\n/* global Tether */\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Tooltip = function ($) {\n\n  /**\n   * Check for Tether dependency\n   * Tether - http://tether.io/\n   */\n  if (window.Tether === undefined) {\n    throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');\n  }\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'tooltip';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.tooltip';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var TRANSITION_DURATION = 150;\n  var CLASS_PREFIX = 'bs-tether';\n\n  var Default = {\n    animation: true,\n    template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    selector: false,\n    placement: 'top',\n    offset: '0 0',\n    constraints: []\n  };\n\n  var DefaultType = {\n    animation: 'boolean',\n    template: 'string',\n    title: '(string|element|function)',\n    trigger: 'string',\n    delay: '(number|object)',\n    html: 'boolean',\n    selector: '(string|boolean)',\n    placement: '(string|function)',\n    offset: 'string',\n    constraints: 'array'\n  };\n\n  var AttachmentMap = {\n    TOP: 'bottom center',\n    RIGHT: 'middle left',\n    BOTTOM: 'top center',\n    LEFT: 'middle right'\n  };\n\n  var HoverState = {\n    IN: 'in',\n    OUT: 'out'\n  };\n\n  var Event = {\n    HIDE: 'hide' + EVENT_KEY,\n    HIDDEN: 'hidden' + EVENT_KEY,\n    SHOW: 'show' + EVENT_KEY,\n    SHOWN: 'shown' + EVENT_KEY,\n    INSERTED: 'inserted' + EVENT_KEY,\n    CLICK: 'click' + EVENT_KEY,\n    FOCUSIN: 'focusin' + EVENT_KEY,\n    FOCUSOUT: 'focusout' + EVENT_KEY,\n    MOUSEENTER: 'mouseenter' + EVENT_KEY,\n    MOUSELEAVE: 'mouseleave' + EVENT_KEY\n  };\n\n  var ClassName = {\n    FADE: 'fade',\n    IN: 'in'\n  };\n\n  var Selector = {\n    TOOLTIP: '.tooltip',\n    TOOLTIP_INNER: '.tooltip-inner'\n  };\n\n  var TetherClass = {\n    element: false,\n    enabled: false\n  };\n\n  var Trigger = {\n    HOVER: 'hover',\n    FOCUS: 'focus',\n    CLICK: 'click',\n    MANUAL: 'manual'\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Tooltip = function () {\n    function Tooltip(element, config) {\n      _classCallCheck(this, Tooltip);\n\n      // private\n      this._isEnabled = true;\n      this._timeout = 0;\n      this._hoverState = '';\n      this._activeTrigger = {};\n      this._tether = null;\n\n      // protected\n      this.element = element;\n      this.config = this._getConfig(config);\n      this.tip = null;\n\n      this._setListeners();\n    }\n\n    // getters\n\n    // public\n\n    Tooltip.prototype.enable = function enable() {\n      this._isEnabled = true;\n    };\n\n    Tooltip.prototype.disable = function disable() {\n      this._isEnabled = false;\n    };\n\n    Tooltip.prototype.toggleEnabled = function toggleEnabled() {\n      this._isEnabled = !this._isEnabled;\n    };\n\n    Tooltip.prototype.toggle = function toggle(event) {\n      if (event) {\n        var dataKey = this.constructor.DATA_KEY;\n        var context = $(event.currentTarget).data(dataKey);\n\n        if (!context) {\n          context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n          $(event.currentTarget).data(dataKey, context);\n        }\n\n        context._activeTrigger.click = !context._activeTrigger.click;\n\n        if (context._isWithActiveTrigger()) {\n          context._enter(null, context);\n        } else {\n          context._leave(null, context);\n        }\n      } else {\n\n        if ($(this.getTipElement()).hasClass(ClassName.IN)) {\n          this._leave(null, this);\n          return;\n        }\n\n        this._enter(null, this);\n      }\n    };\n\n    Tooltip.prototype.dispose = function dispose() {\n      clearTimeout(this._timeout);\n\n      this.cleanupTether();\n\n      $.removeData(this.element, this.constructor.DATA_KEY);\n\n      $(this.element).off(this.constructor.EVENT_KEY);\n\n      if (this.tip) {\n        $(this.tip).remove();\n      }\n\n      this._isEnabled = null;\n      this._timeout = null;\n      this._hoverState = null;\n      this._activeTrigger = null;\n      this._tether = null;\n\n      this.element = null;\n      this.config = null;\n      this.tip = null;\n    };\n\n    Tooltip.prototype.show = function show() {\n      var _this16 = this;\n\n      var showEvent = $.Event(this.constructor.Event.SHOW);\n\n      if (this.isWithContent() && this._isEnabled) {\n        $(this.element).trigger(showEvent);\n\n        var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);\n\n        if (showEvent.isDefaultPrevented() || !isInTheDom) {\n          return;\n        }\n\n        var tip = this.getTipElement();\n        var tipId = Util.getUID(this.constructor.NAME);\n\n        tip.setAttribute('id', tipId);\n        this.element.setAttribute('aria-describedby', tipId);\n\n        this.setContent();\n\n        if (this.config.animation) {\n          $(tip).addClass(ClassName.FADE);\n        }\n\n        var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;\n\n        var attachment = this._getAttachment(placement);\n\n        $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);\n\n        $(this.element).trigger(this.constructor.Event.INSERTED);\n\n        this._tether = new Tether({\n          attachment: attachment,\n          element: tip,\n          target: this.element,\n          classes: TetherClass,\n          classPrefix: CLASS_PREFIX,\n          offset: this.config.offset,\n          constraints: this.config.constraints,\n          addTargetClasses: false\n        });\n\n        Util.reflow(tip);\n        this._tether.position();\n\n        $(tip).addClass(ClassName.IN);\n\n        var complete = function complete() {\n          var prevHoverState = _this16._hoverState;\n          _this16._hoverState = null;\n\n          $(_this16.element).trigger(_this16.constructor.Event.SHOWN);\n\n          if (prevHoverState === HoverState.OUT) {\n            _this16._leave(null, _this16);\n          }\n        };\n\n        if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n          $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);\n          return;\n        }\n\n        complete();\n      }\n    };\n\n    Tooltip.prototype.hide = function hide(callback) {\n      var _this17 = this;\n\n      var tip = this.getTipElement();\n      var hideEvent = $.Event(this.constructor.Event.HIDE);\n      var complete = function complete() {\n        if (_this17._hoverState !== HoverState.IN && tip.parentNode) {\n          tip.parentNode.removeChild(tip);\n        }\n\n        _this17.element.removeAttribute('aria-describedby');\n        $(_this17.element).trigger(_this17.constructor.Event.HIDDEN);\n        _this17.cleanupTether();\n\n        if (callback) {\n          callback();\n        }\n      };\n\n      $(this.element).trigger(hideEvent);\n\n      if (hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      $(tip).removeClass(ClassName.IN);\n\n      if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n\n        $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);\n      } else {\n        complete();\n      }\n\n      this._hoverState = '';\n    };\n\n    // protected\n\n    Tooltip.prototype.isWithContent = function isWithContent() {\n      return Boolean(this.getTitle());\n    };\n\n    Tooltip.prototype.getTipElement = function getTipElement() {\n      return this.tip = this.tip || $(this.config.template)[0];\n    };\n\n    Tooltip.prototype.setContent = function setContent() {\n      var $tip = $(this.getTipElement());\n\n      this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());\n\n      $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);\n\n      this.cleanupTether();\n    };\n\n    Tooltip.prototype.setElementContent = function setElementContent($element, content) {\n      var html = this.config.html;\n      if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) {\n        // content is a DOM node or a jQuery\n        if (html) {\n          if (!$(content).parent().is($element)) {\n            $element.empty().append(content);\n          }\n        } else {\n          $element.text($(content).text());\n        }\n      } else {\n        $element[html ? 'html' : 'text'](content);\n      }\n    };\n\n    Tooltip.prototype.getTitle = function getTitle() {\n      var title = this.element.getAttribute('data-original-title');\n\n      if (!title) {\n        title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;\n      }\n\n      return title;\n    };\n\n    Tooltip.prototype.cleanupTether = function cleanupTether() {\n      if (this._tether) {\n        this._tether.destroy();\n      }\n    };\n\n    // private\n\n    Tooltip.prototype._getAttachment = function _getAttachment(placement) {\n      return AttachmentMap[placement.toUpperCase()];\n    };\n\n    Tooltip.prototype._setListeners = function _setListeners() {\n      var _this18 = this;\n\n      var triggers = this.config.trigger.split(' ');\n\n      triggers.forEach(function (trigger) {\n        if (trigger === 'click') {\n          $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18));\n        } else if (trigger !== Trigger.MANUAL) {\n          var eventIn = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN;\n          var eventOut = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT;\n\n          $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18));\n        }\n      });\n\n      if (this.config.selector) {\n        this.config = $.extend({}, this.config, {\n          trigger: 'manual',\n          selector: ''\n        });\n      } else {\n        this._fixTitle();\n      }\n    };\n\n    Tooltip.prototype._fixTitle = function _fixTitle() {\n      var titleType = _typeof(this.element.getAttribute('data-original-title'));\n      if (this.element.getAttribute('title') || titleType !== 'string') {\n        this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');\n        this.element.setAttribute('title', '');\n      }\n    };\n\n    Tooltip.prototype._enter = function _enter(event, context) {\n      var dataKey = this.constructor.DATA_KEY;\n\n      context = context || $(event.currentTarget).data(dataKey);\n\n      if (!context) {\n        context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n        $(event.currentTarget).data(dataKey, context);\n      }\n\n      if (event) {\n        context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;\n      }\n\n      if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {\n        context._hoverState = HoverState.IN;\n        return;\n      }\n\n      clearTimeout(context._timeout);\n\n      context._hoverState = HoverState.IN;\n\n      if (!context.config.delay || !context.config.delay.show) {\n        context.show();\n        return;\n      }\n\n      context._timeout = setTimeout(function () {\n        if (context._hoverState === HoverState.IN) {\n          context.show();\n        }\n      }, context.config.delay.show);\n    };\n\n    Tooltip.prototype._leave = function _leave(event, context) {\n      var dataKey = this.constructor.DATA_KEY;\n\n      context = context || $(event.currentTarget).data(dataKey);\n\n      if (!context) {\n        context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n        $(event.currentTarget).data(dataKey, context);\n      }\n\n      if (event) {\n        context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;\n      }\n\n      if (context._isWithActiveTrigger()) {\n        return;\n      }\n\n      clearTimeout(context._timeout);\n\n      context._hoverState = HoverState.OUT;\n\n      if (!context.config.delay || !context.config.delay.hide) {\n        context.hide();\n        return;\n      }\n\n      context._timeout = setTimeout(function () {\n        if (context._hoverState === HoverState.OUT) {\n          context.hide();\n        }\n      }, context.config.delay.hide);\n    };\n\n    Tooltip.prototype._isWithActiveTrigger = function _isWithActiveTrigger() {\n      for (var trigger in this._activeTrigger) {\n        if (this._activeTrigger[trigger]) {\n          return true;\n        }\n      }\n\n      return false;\n    };\n\n    Tooltip.prototype._getConfig = function _getConfig(config) {\n      config = $.extend({}, this.constructor.Default, $(this.element).data(), config);\n\n      if (config.delay && typeof config.delay === 'number') {\n        config.delay = {\n          show: config.delay,\n          hide: config.delay\n        };\n      }\n\n      Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);\n\n      return config;\n    };\n\n    Tooltip.prototype._getDelegateConfig = function _getDelegateConfig() {\n      var config = {};\n\n      if (this.config) {\n        for (var key in this.config) {\n          if (this.constructor.Default[key] !== this.config[key]) {\n            config[key] = this.config[key];\n          }\n        }\n      }\n\n      return config;\n    };\n\n    // static\n\n    Tooltip._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY);\n        var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;\n\n        if (!data && /dispose|hide/.test(config)) {\n          return;\n        }\n\n        if (!data) {\n          data = new Tooltip(this, _config);\n          $(this).data(DATA_KEY, data);\n        }\n\n        if (typeof config === 'string') {\n          if (data[config] === undefined) {\n            throw new Error('No method named \"' + config + '\"');\n          }\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Tooltip, null, [{\n      key: 'VERSION',\n      get: function get() {\n        return VERSION;\n      }\n    }, {\n      key: 'Default',\n      get: function get() {\n        return Default;\n      }\n    }, {\n      key: 'NAME',\n      get: function get() {\n        return NAME;\n      }\n    }, {\n      key: 'DATA_KEY',\n      get: function get() {\n        return DATA_KEY;\n      }\n    }, {\n      key: 'Event',\n      get: function get() {\n        return Event;\n      }\n    }, {\n      key: 'EVENT_KEY',\n      get: function get() {\n        return EVENT_KEY;\n      }\n    }, {\n      key: 'DefaultType',\n      get: function get() {\n        return DefaultType;\n      }\n    }]);\n\n    return Tooltip;\n  }();\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Tooltip._jQueryInterface;\n  $.fn[NAME].Constructor = Tooltip;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Tooltip._jQueryInterface;\n  };\n\n  return Tooltip;\n}(jQuery);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.5): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nvar Popover = function ($) {\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'popover';\n  var VERSION = '4.0.0-alpha.5';\n  var DATA_KEY = 'bs.popover';\n  var EVENT_KEY = '.' + DATA_KEY;\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n\n  var Default = $.extend({}, Tooltip.Default, {\n    placement: 'right',\n    trigger: 'click',\n    content: '',\n    template: '<div class=\"popover\" role=\"tooltip\">' + '<h3 class=\"popover-title\"></h3>' + '<div class=\"popover-content\"></div></div>'\n  });\n\n  var DefaultType = $.extend({}, Tooltip.DefaultType, {\n    content: '(string|element|function)'\n  });\n\n  var ClassName = {\n    FADE: 'fade',\n    IN: 'in'\n  };\n\n  var Selector = {\n    TITLE: '.popover-title',\n    CONTENT: '.popover-content'\n  };\n\n  var Event = {\n    HIDE: 'hide' + EVENT_KEY,\n    HIDDEN: 'hidden' + EVENT_KEY,\n    SHOW: 'show' + EVENT_KEY,\n    SHOWN: 'shown' + EVENT_KEY,\n    INSERTED: 'inserted' + EVENT_KEY,\n    CLICK: 'click' + EVENT_KEY,\n    FOCUSIN: 'focusin' + EVENT_KEY,\n    FOCUSOUT: 'focusout' + EVENT_KEY,\n    MOUSEENTER: 'mouseenter' + EVENT_KEY,\n    MOUSELEAVE: 'mouseleave' + EVENT_KEY\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Popover = function (_Tooltip) {\n    _inherits(Popover, _Tooltip);\n\n    function Popover() {\n      _classCallCheck(this, Popover);\n\n      return _possibleConstructorReturn(this, _Tooltip.apply(this, arguments));\n    }\n\n    // overrides\n\n    Popover.prototype.isWithContent = function isWithContent() {\n      return this.getTitle() || this._getContent();\n    };\n\n    Popover.prototype.getTipElement = function getTipElement() {\n      return this.tip = this.tip || $(this.config.template)[0];\n    };\n\n    Popover.prototype.setContent = function setContent() {\n      var $tip = $(this.getTipElement());\n\n      // we use append for html objects to maintain js events\n      this.setElementContent($tip.find(Selector.TITLE), this.getTitle());\n      this.setElementContent($tip.find(Selector.CONTENT), this._getContent());\n\n      $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);\n\n      this.cleanupTether();\n    };\n\n    // private\n\n    Popover.prototype._getContent = function _getContent() {\n      return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);\n    };\n\n    // static\n\n    Popover._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY);\n        var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;\n\n        if (!data && /destroy|hide/.test(config)) {\n          return;\n        }\n\n        if (!data) {\n          data = new Popover(this, _config);\n          $(this).data(DATA_KEY, data);\n        }\n\n        if (typeof config === 'string') {\n          if (data[config] === undefined) {\n            throw new Error('No method named \"' + config + '\"');\n          }\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Popover, null, [{\n      key: 'VERSION',\n\n\n      // getters\n\n      get: function get() {\n        return VERSION;\n      }\n    }, {\n      key: 'Default',\n      get: function get() {\n        return Default;\n      }\n    }, {\n      key: 'NAME',\n      get: function get() {\n        return NAME;\n      }\n    }, {\n      key: 'DATA_KEY',\n      get: function get() {\n        return DATA_KEY;\n      }\n    }, {\n      key: 'Event',\n      get: function get() {\n        return Event;\n      }\n    }, {\n      key: 'EVENT_KEY',\n      get: function get() {\n        return EVENT_KEY;\n      }\n    }, {\n      key: 'DefaultType',\n      get: function get() {\n        return DefaultType;\n      }\n    }]);\n\n    return Popover;\n  }(Tooltip);\n\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Popover._jQueryInterface;\n  $.fn[NAME].Constructor = Popover;\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Popover._jQueryInterface;\n  };\n\n  return Popover;\n}(jQuery);\n\n}();\n"

/***/ },

/***/ 736:
/***/ function(module, exports) {

module.exports = "/*! version : 4.17.43\r\n =========================================================\r\n bootstrap-datetimejs\r\n https://github.com/Eonasdan/bootstrap-datetimepicker\r\n Copyright (c) 2015 Jonathan Peterson\r\n =========================================================\r\n */\r\n/*\r\n The MIT License (MIT)\r\n\r\n Copyright (c) 2015 Jonathan Peterson\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be included in\r\n all copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n THE SOFTWARE.\r\n */\r\n/*global define:false */\r\n/*global exports:false */\r\n/*global require:false */\r\n/*global jQuery:false */\r\n/*global moment:false */\r\n(function (factory) {\r\n    'use strict';\r\n    if (typeof define === 'function' && define.amd) {\r\n        // AMD is used - Register as an anonymous module.\r\n        define(['jquery', 'moment'], factory);\r\n    } else if (typeof exports === 'object') {\r\n        module.exports = factory(require('jquery'), require('moment'));\r\n    } else {\r\n        // Neither AMD nor CommonJS used. Use global variables.\r\n        if (typeof jQuery === 'undefined') {\r\n            throw 'bootstrap-datetimepicker requires jQuery to be loaded first';\r\n        }\r\n        if (typeof moment === 'undefined') {\r\n            throw 'bootstrap-datetimepicker requires Moment.js to be loaded first';\r\n        }\r\n        factory(jQuery, moment);\r\n    }\r\n}(function ($, moment) {\r\n    'use strict';\r\n    if (!moment) {\r\n        throw new Error('bootstrap-datetimepicker requires Moment.js to be loaded first');\r\n    }\r\n\r\n    var dateTimePicker = function (element, options) {\r\n        var picker = {},\r\n            date,\r\n            viewDate,\r\n            unset = true,\r\n            input,\r\n            component = false,\r\n            widget = false,\r\n            use24Hours,\r\n            minViewModeNumber = 0,\r\n            actualFormat,\r\n            parseFormats,\r\n            currentViewMode,\r\n            datePickerModes = [\r\n                {\r\n                    clsName: 'days',\r\n                    navFnc: 'M',\r\n                    navStep: 1\r\n                },\r\n                {\r\n                    clsName: 'months',\r\n                    navFnc: 'y',\r\n                    navStep: 1\r\n                },\r\n                {\r\n                    clsName: 'years',\r\n                    navFnc: 'y',\r\n                    navStep: 10\r\n                },\r\n                {\r\n                    clsName: 'decades',\r\n                    navFnc: 'y',\r\n                    navStep: 100\r\n                }\r\n            ],\r\n            viewModes = ['days', 'months', 'years', 'decades'],\r\n            verticalModes = ['top', 'bottom', 'auto'],\r\n            horizontalModes = ['left', 'right', 'auto'],\r\n            toolbarPlacements = ['default', 'top', 'bottom'],\r\n            keyMap = {\r\n                'up': 38,\r\n                38: 'up',\r\n                'down': 40,\r\n                40: 'down',\r\n                'left': 37,\r\n                37: 'left',\r\n                'right': 39,\r\n                39: 'right',\r\n                'tab': 9,\r\n                9: 'tab',\r\n                'escape': 27,\r\n                27: 'escape',\r\n                'enter': 13,\r\n                13: 'enter',\r\n                'pageUp': 33,\r\n                33: 'pageUp',\r\n                'pageDown': 34,\r\n                34: 'pageDown',\r\n                'shift': 16,\r\n                16: 'shift',\r\n                'control': 17,\r\n                17: 'control',\r\n                'space': 32,\r\n                32: 'space',\r\n                't': 84,\r\n                84: 't',\r\n                'delete': 46,\r\n                46: 'delete'\r\n            },\r\n            keyState = {},\r\n\r\n            /********************************************************************************\r\n             *\r\n             * Private functions\r\n             *\r\n             ********************************************************************************/\r\n\r\n            hasTimeZone = function () {\r\n                return moment.tz !== undefined && options.timeZone !== undefined && options.timeZone !== null && options.timeZone !== '';\r\n            },\r\n\r\n            getMoment = function (d) {\r\n                var returnMoment;\r\n\r\n                if (d === undefined || d === null) {\r\n                    returnMoment = moment(); //TODO should this use format? and locale?\r\n                } else if (hasTimeZone()) { // There is a string to parse and a default time zone\r\n                    // parse with the tz function which takes a default time zone if it is not in the format string\r\n                    returnMoment = moment.tz(d, parseFormats, options.useStrict, options.timeZone);\r\n                } else {\r\n                    returnMoment = moment(d, parseFormats, options.useStrict);\r\n                }\r\n\r\n                if (hasTimeZone()) {\r\n                    returnMoment.tz(options.timeZone);\r\n                }\r\n\r\n                return returnMoment;\r\n            },\r\n\r\n            isEnabled = function (granularity) {\r\n                if (typeof granularity !== 'string' || granularity.length > 1) {\r\n                    throw new TypeError('isEnabled expects a single character string parameter');\r\n                }\r\n                switch (granularity) {\r\n                    case 'y':\r\n                        return actualFormat.indexOf('Y') !== -1;\r\n                    case 'M':\r\n                        return actualFormat.indexOf('M') !== -1;\r\n                    case 'd':\r\n                        return actualFormat.toLowerCase().indexOf('d') !== -1;\r\n                    case 'h':\r\n                    case 'H':\r\n                        return actualFormat.toLowerCase().indexOf('h') !== -1;\r\n                    case 'm':\r\n                        return actualFormat.indexOf('m') !== -1;\r\n                    case 's':\r\n                        return actualFormat.indexOf('s') !== -1;\r\n                    default:\r\n                        return false;\r\n                }\r\n            },\r\n\r\n            hasTime = function () {\r\n                return (isEnabled('h') || isEnabled('m') || isEnabled('s'));\r\n            },\r\n\r\n            hasDate = function () {\r\n                return (isEnabled('y') || isEnabled('M') || isEnabled('d'));\r\n            },\r\n\r\n            getDatePickerTemplate = function () {\r\n                var headTemplate = $('<thead>')\r\n                        .append($('<tr>')\r\n                            .append($('<th>').addClass('prev').attr('data-action', 'previous')\r\n                                .append($('<span>').addClass(options.icons.previous))\r\n                                )\r\n                            .append($('<th>').addClass('picker-switch').attr('data-action', 'pickerSwitch').attr('colspan', (options.calendarWeeks ? '6' : '5')))\r\n                            .append($('<th>').addClass('next').attr('data-action', 'next')\r\n                                .append($('<span>').addClass(options.icons.next))\r\n                                )\r\n                            ),\r\n                    contTemplate = $('<tbody>')\r\n                        .append($('<tr>')\r\n                            .append($('<td>').attr('colspan', (options.calendarWeeks ? '8' : '7')))\r\n                            );\r\n\r\n                return [\r\n                    $('<div>').addClass('datepicker-days')\r\n                        .append($('<table>').addClass('table-condensed')\r\n                            .append(headTemplate)\r\n                            .append($('<tbody>'))\r\n                            ),\r\n                    $('<div>').addClass('datepicker-months')\r\n                        .append($('<table>').addClass('table-condensed')\r\n                            .append(headTemplate.clone())\r\n                            .append(contTemplate.clone())\r\n                            ),\r\n                    $('<div>').addClass('datepicker-years')\r\n                        .append($('<table>').addClass('table-condensed')\r\n                            .append(headTemplate.clone())\r\n                            .append(contTemplate.clone())\r\n                            ),\r\n                    $('<div>').addClass('datepicker-decades')\r\n                        .append($('<table>').addClass('table-condensed')\r\n                            .append(headTemplate.clone())\r\n                            .append(contTemplate.clone())\r\n                            )\r\n                ];\r\n            },\r\n\r\n            getTimePickerMainTemplate = function () {\r\n                var topRow = $('<tr>'),\r\n                    middleRow = $('<tr>'),\r\n                    bottomRow = $('<tr>');\r\n\r\n                if (isEnabled('h')) {\r\n                    topRow.append($('<td>')\r\n                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementHour }).addClass('btn').attr('data-action', 'incrementHours').append($('<span>').addClass(options.icons.up))));\r\n                    middleRow.append($('<td>')\r\n                        .append($('<span>').addClass('timepicker-hour').attr({ 'data-time-component': 'hours', 'title': options.tooltips.pickHour }).attr('data-action', 'showHours')));\r\n                    bottomRow.append($('<td>')\r\n                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementHour }).addClass('btn').attr('data-action', 'decrementHours').append($('<span>').addClass(options.icons.down))));\r\n                }\r\n                if (isEnabled('m')) {\r\n                    if (isEnabled('h')) {\r\n                        topRow.append($('<td>').addClass('separator'));\r\n                        middleRow.append($('<td>').addClass('separator').html(':'));\r\n                        bottomRow.append($('<td>').addClass('separator'));\r\n                    }\r\n                    topRow.append($('<td>')\r\n                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementMinute }).addClass('btn').attr('data-action', 'incrementMinutes')\r\n                            .append($('<span>').addClass(options.icons.up))));\r\n                    middleRow.append($('<td>')\r\n                        .append($('<span>').addClass('timepicker-minute').attr({ 'data-time-component': 'minutes', 'title': options.tooltips.pickMinute }).attr('data-action', 'showMinutes')));\r\n                    bottomRow.append($('<td>')\r\n                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementMinute }).addClass('btn').attr('data-action', 'decrementMinutes')\r\n                            .append($('<span>').addClass(options.icons.down))));\r\n                }\r\n                if (isEnabled('s')) {\r\n                    if (isEnabled('m')) {\r\n                        topRow.append($('<td>').addClass('separator'));\r\n                        middleRow.append($('<td>').addClass('separator').html(':'));\r\n                        bottomRow.append($('<td>').addClass('separator'));\r\n                    }\r\n                    topRow.append($('<td>')\r\n                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementSecond }).addClass('btn').attr('data-action', 'incrementSeconds')\r\n                            .append($('<span>').addClass(options.icons.up))));\r\n                    middleRow.append($('<td>')\r\n                        .append($('<span>').addClass('timepicker-second').attr({ 'data-time-component': 'seconds', 'title': options.tooltips.pickSecond }).attr('data-action', 'showSeconds')));\r\n                    bottomRow.append($('<td>')\r\n                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementSecond }).addClass('btn').attr('data-action', 'decrementSeconds')\r\n                            .append($('<span>').addClass(options.icons.down))));\r\n                }\r\n\r\n                if (!use24Hours) {\r\n                    topRow.append($('<td>').addClass('separator'));\r\n                    middleRow.append($('<td>')\r\n                        .append($('<button>').addClass('btn btn-primary').attr({ 'data-action': 'togglePeriod', tabindex: '-1', 'title': options.tooltips.togglePeriod })));\r\n                    bottomRow.append($('<td>').addClass('separator'));\r\n                }\r\n\r\n                return $('<div>').addClass('timepicker-picker')\r\n                    .append($('<table>').addClass('table-condensed')\r\n                        .append([topRow, middleRow, bottomRow]));\r\n            },\r\n\r\n            getTimePickerTemplate = function () {\r\n                var hoursView = $('<div>').addClass('timepicker-hours')\r\n                        .append($('<table>').addClass('table-condensed')),\r\n                    minutesView = $('<div>').addClass('timepicker-minutes')\r\n                        .append($('<table>').addClass('table-condensed')),\r\n                    secondsView = $('<div>').addClass('timepicker-seconds')\r\n                        .append($('<table>').addClass('table-condensed')),\r\n                    ret = [getTimePickerMainTemplate()];\r\n\r\n                if (isEnabled('h')) {\r\n                    ret.push(hoursView);\r\n                }\r\n                if (isEnabled('m')) {\r\n                    ret.push(minutesView);\r\n                }\r\n                if (isEnabled('s')) {\r\n                    ret.push(secondsView);\r\n                }\r\n\r\n                return ret;\r\n            },\r\n\r\n            getToolbar = function () {\r\n                var row = [];\r\n                if (options.showTodayButton) {\r\n                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'today', 'title': options.tooltips.today }).append($('<span>').addClass(options.icons.today))));\r\n                }\r\n                if (!options.sideBySide && hasDate() && hasTime()) {\r\n                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'togglePicker', 'title': options.tooltips.selectTime }).append($('<span>').addClass(options.icons.time))));\r\n                }\r\n                if (options.showClear) {\r\n                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'clear', 'title': options.tooltips.clear }).append($('<span>').addClass(options.icons.clear))));\r\n                }\r\n                if (options.showClose) {\r\n                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'close', 'title': options.tooltips.close }).append($('<span>').addClass(options.icons.close))));\r\n                }\r\n                return $('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));\r\n            },\r\n\r\n            getTemplate = function () {\r\n                var template = $('<div>').addClass('bootstrap-datetimepicker-widget dropdown-menu'),\r\n                    dateView = $('<div>').addClass('datepicker').append(getDatePickerTemplate()),\r\n                    timeView = $('<div>').addClass('timepicker').append(getTimePickerTemplate()),\r\n                    content = $('<ul>').addClass('list-unstyled'),\r\n                    toolbar = $('<li>').addClass('picker-switch' + (options.collapse ? ' accordion-toggle' : '')).append(getToolbar());\r\n\r\n                if (options.inline) {\r\n                    template.removeClass('dropdown-menu');\r\n                }\r\n\r\n                if (use24Hours) {\r\n                    template.addClass('usetwentyfour');\r\n                }\r\n                if (isEnabled('s') && !use24Hours) {\r\n                    template.addClass('wider');\r\n                }\r\n\r\n                if (options.sideBySide && hasDate() && hasTime()) {\r\n                    template.addClass('timepicker-sbs');\r\n                    if (options.toolbarPlacement === 'top') {\r\n                        template.append(toolbar);\r\n                    }\r\n                    template.append(\r\n                        $('<div>').addClass('row')\r\n                            .append(dateView.addClass('col-md-6'))\r\n                            .append(timeView.addClass('col-md-6'))\r\n                    );\r\n                    if (options.toolbarPlacement === 'bottom') {\r\n                        template.append(toolbar);\r\n                    }\r\n                    return template;\r\n                }\r\n\r\n                if (options.toolbarPlacement === 'top') {\r\n                    content.append(toolbar);\r\n                }\r\n                if (hasDate()) {\r\n                    content.append($('<li>').addClass((options.collapse && hasTime() ? 'collapse in' : '')).append(dateView));\r\n                }\r\n                if (options.toolbarPlacement === 'default') {\r\n                    content.append(toolbar);\r\n                }\r\n                if (hasTime()) {\r\n                    content.append($('<li>').addClass((options.collapse && hasDate() ? 'collapse' : '')).append(timeView));\r\n                }\r\n                if (options.toolbarPlacement === 'bottom') {\r\n                    content.append(toolbar);\r\n                }\r\n                return template.append(content);\r\n            },\r\n\r\n            dataToOptions = function () {\r\n                var eData,\r\n                    dataOptions = {};\r\n\r\n                if (element.is('input') || options.inline) {\r\n                    eData = element.data();\r\n                } else {\r\n                    eData = element.find('input').data();\r\n                }\r\n\r\n                if (eData.dateOptions && eData.dateOptions instanceof Object) {\r\n                    dataOptions = $.extend(true, dataOptions, eData.dateOptions);\r\n                }\r\n\r\n                $.each(options, function (key) {\r\n                    var attributeName = 'date' + key.charAt(0).toUpperCase() + key.slice(1);\r\n                    if (eData[attributeName] !== undefined) {\r\n                        dataOptions[key] = eData[attributeName];\r\n                    }\r\n                });\r\n                return dataOptions;\r\n            },\r\n\r\n            place = function () {\r\n                var position = (component || element).position(),\r\n                    offset = (component || element).offset(),\r\n                    vertical = options.widgetPositioning.vertical,\r\n                    horizontal = options.widgetPositioning.horizontal,\r\n                    parent;\r\n\r\n                if (options.widgetParent) {\r\n                    parent = options.widgetParent.append(widget);\r\n                } else if (element.is('input')) {\r\n                    parent = element.after(widget).parent();\r\n                } else if (options.inline) {\r\n                    parent = element.append(widget);\r\n                    return;\r\n                } else {\r\n                    parent = element;\r\n                    element.children().first().after(widget);\r\n                }\r\n\r\n                // Top and bottom logic\r\n                if (vertical === 'auto') {\r\n                    if (offset.top + widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() &&\r\n                        widget.height() + element.outerHeight() < offset.top) {\r\n                        vertical = 'top';\r\n                    } else {\r\n                        vertical = 'bottom';\r\n                    }\r\n                }\r\n\r\n                // Left and right logic\r\n                if (horizontal === 'auto') {\r\n                    if (parent.width() < offset.left + widget.outerWidth() / 2 &&\r\n                        offset.left + widget.outerWidth() > $(window).width()) {\r\n                        horizontal = 'right';\r\n                    } else {\r\n                        horizontal = 'left';\r\n                    }\r\n                }\r\n\r\n                if (vertical === 'top') {\r\n                    widget.addClass('top').removeClass('bottom');\r\n                } else {\r\n                    widget.addClass('bottom').removeClass('top');\r\n                }\r\n\r\n                if (horizontal === 'right') {\r\n                    widget.addClass('pull-right');\r\n                } else {\r\n                    widget.removeClass('pull-right');\r\n                }\r\n\r\n                // find the first parent element that has a relative css positioning\r\n                if (parent.css('position') !== 'relative') {\r\n                    parent = parent.parents().filter(function () {\r\n                        return $(this).css('position') === 'relative';\r\n                    }).first();\r\n                }\r\n\r\n                if (parent.length === 0) {\r\n                    throw new Error('datetimepicker component should be placed within a relative positioned container');\r\n                }\r\n\r\n                widget.css({\r\n                    top: vertical === 'top' ? 'auto' : position.top + element.outerHeight(),\r\n                    bottom: vertical === 'top' ? parent.outerHeight() - (parent === element ? 0 : position.top) : 'auto',\r\n                    left: horizontal === 'left' ? (parent === element ? 0 : position.left) : 'auto',\r\n                    right: horizontal === 'left' ? 'auto' : parent.outerWidth() - element.outerWidth() - (parent === element ? 0 : position.left)\r\n                });\r\n            },\r\n\r\n            notifyEvent = function (e) {\r\n                if (e.type === 'dp.change' && ((e.date && e.date.isSame(e.oldDate)) || (!e.date && !e.oldDate))) {\r\n                    return;\r\n                }\r\n                element.trigger(e);\r\n            },\r\n\r\n            viewUpdate = function (e) {\r\n                if (e === 'y') {\r\n                    e = 'YYYY';\r\n                }\r\n                notifyEvent({\r\n                    type: 'dp.update',\r\n                    change: e,\r\n                    viewDate: viewDate.clone()\r\n                });\r\n            },\r\n\r\n            showMode = function (dir) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                if (dir) {\r\n                    currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir));\r\n                }\r\n                widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show();\r\n            },\r\n\r\n            fillDow = function () {\r\n                var row = $('<tr>'),\r\n                    currentDate = viewDate.clone().startOf('w').startOf('d');\r\n\r\n                if (options.calendarWeeks === true) {\r\n                    row.append($('<th>').addClass('cw').text('#'));\r\n                }\r\n\r\n                while (currentDate.isBefore(viewDate.clone().endOf('w'))) {\r\n                    row.append($('<th>').addClass('dow').text(currentDate.format('dd')));\r\n                    currentDate.add(1, 'd');\r\n                }\r\n                widget.find('.datepicker-days thead').append(row);\r\n            },\r\n\r\n            isInDisabledDates = function (testDate) {\r\n                return options.disabledDates[testDate.format('YYYY-MM-DD')] === true;\r\n            },\r\n\r\n            isInEnabledDates = function (testDate) {\r\n                return options.enabledDates[testDate.format('YYYY-MM-DD')] === true;\r\n            },\r\n\r\n            isInDisabledHours = function (testDate) {\r\n                return options.disabledHours[testDate.format('H')] === true;\r\n            },\r\n\r\n            isInEnabledHours = function (testDate) {\r\n                return options.enabledHours[testDate.format('H')] === true;\r\n            },\r\n\r\n            isValid = function (targetMoment, granularity) {\r\n                if (!targetMoment.isValid()) {\r\n                    return false;\r\n                }\r\n                if (options.disabledDates && granularity === 'd' && isInDisabledDates(targetMoment)) {\r\n                    return false;\r\n                }\r\n                if (options.enabledDates && granularity === 'd' && !isInEnabledDates(targetMoment)) {\r\n                    return false;\r\n                }\r\n                if (options.minDate && targetMoment.isBefore(options.minDate, granularity)) {\r\n                    return false;\r\n                }\r\n                if (options.maxDate && targetMoment.isAfter(options.maxDate, granularity)) {\r\n                    return false;\r\n                }\r\n                if (options.daysOfWeekDisabled && granularity === 'd' && options.daysOfWeekDisabled.indexOf(targetMoment.day()) !== -1) {\r\n                    return false;\r\n                }\r\n                if (options.disabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && isInDisabledHours(targetMoment)) {\r\n                    return false;\r\n                }\r\n                if (options.enabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && !isInEnabledHours(targetMoment)) {\r\n                    return false;\r\n                }\r\n                if (options.disabledTimeIntervals && (granularity === 'h' || granularity === 'm' || granularity === 's')) {\r\n                    var found = false;\r\n                    $.each(options.disabledTimeIntervals, function () {\r\n                        if (targetMoment.isBetween(this[0], this[1])) {\r\n                            found = true;\r\n                            return false;\r\n                        }\r\n                    });\r\n                    if (found) {\r\n                        return false;\r\n                    }\r\n                }\r\n                return true;\r\n            },\r\n\r\n            fillMonths = function () {\r\n                var spans = [],\r\n                    monthsShort = viewDate.clone().startOf('y').startOf('d');\r\n                while (monthsShort.isSame(viewDate, 'y')) {\r\n                    spans.push($('<span>').attr('data-action', 'selectMonth').addClass('month').text(monthsShort.format('MMM')));\r\n                    monthsShort.add(1, 'M');\r\n                }\r\n                widget.find('.datepicker-months td').empty().append(spans);\r\n            },\r\n\r\n            updateMonths = function () {\r\n                var monthsView = widget.find('.datepicker-months'),\r\n                    monthsViewHeader = monthsView.find('th'),\r\n                    months = monthsView.find('tbody').find('span');\r\n\r\n                monthsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevYear);\r\n                monthsViewHeader.eq(1).attr('title', options.tooltips.selectYear);\r\n                monthsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextYear);\r\n\r\n                monthsView.find('.disabled').removeClass('disabled');\r\n\r\n                if (!isValid(viewDate.clone().subtract(1, 'y'), 'y')) {\r\n                    monthsViewHeader.eq(0).addClass('disabled');\r\n                }\r\n\r\n                monthsViewHeader.eq(1).text(viewDate.year());\r\n\r\n                if (!isValid(viewDate.clone().add(1, 'y'), 'y')) {\r\n                    monthsViewHeader.eq(2).addClass('disabled');\r\n                }\r\n\r\n                months.removeClass('active');\r\n                if (date.isSame(viewDate, 'y') && !unset) {\r\n                    months.eq(date.month()).addClass('active');\r\n                }\r\n\r\n                months.each(function (index) {\r\n                    if (!isValid(viewDate.clone().month(index), 'M')) {\r\n                        $(this).addClass('disabled');\r\n                    }\r\n                });\r\n            },\r\n\r\n            updateYears = function () {\r\n                var yearsView = widget.find('.datepicker-years'),\r\n                    yearsViewHeader = yearsView.find('th'),\r\n                    startYear = viewDate.clone().subtract(5, 'y'),\r\n                    endYear = viewDate.clone().add(6, 'y'),\r\n                    html = '';\r\n\r\n                yearsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevDecade);\r\n                yearsViewHeader.eq(1).attr('title', options.tooltips.selectDecade);\r\n                yearsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextDecade);\r\n\r\n                yearsView.find('.disabled').removeClass('disabled');\r\n\r\n                if (options.minDate && options.minDate.isAfter(startYear, 'y')) {\r\n                    yearsViewHeader.eq(0).addClass('disabled');\r\n                }\r\n\r\n                yearsViewHeader.eq(1).text(startYear.year() + '-' + endYear.year());\r\n\r\n                if (options.maxDate && options.maxDate.isBefore(endYear, 'y')) {\r\n                    yearsViewHeader.eq(2).addClass('disabled');\r\n                }\r\n\r\n                while (!startYear.isAfter(endYear, 'y')) {\r\n                    html += '<span data-action=\"selectYear\" class=\"year' + (startYear.isSame(date, 'y') && !unset ? ' active' : '') + (!isValid(startYear, 'y') ? ' disabled' : '') + '\">' + startYear.year() + '</span>';\r\n                    startYear.add(1, 'y');\r\n                }\r\n\r\n                yearsView.find('td').html(html);\r\n            },\r\n\r\n            updateDecades = function () {\r\n                var decadesView = widget.find('.datepicker-decades'),\r\n                    decadesViewHeader = decadesView.find('th'),\r\n                    startDecade = moment({ y: viewDate.year() - (viewDate.year() % 100) - 1 }),\r\n                    endDecade = startDecade.clone().add(100, 'y'),\r\n                    startedAt = startDecade.clone(),\r\n                    minDateDecade = false,\r\n                    maxDateDecade = false,\r\n                    endDecadeYear,\r\n                    html = '';\r\n\r\n                decadesViewHeader.eq(0).find('span').attr('title', options.tooltips.prevCentury);\r\n                decadesViewHeader.eq(2).find('span').attr('title', options.tooltips.nextCentury);\r\n\r\n                decadesView.find('.disabled').removeClass('disabled');\r\n\r\n                if (startDecade.isSame(moment({ y: 1900 })) || (options.minDate && options.minDate.isAfter(startDecade, 'y'))) {\r\n                    decadesViewHeader.eq(0).addClass('disabled');\r\n                }\r\n\r\n                decadesViewHeader.eq(1).text(startDecade.year() + '-' + endDecade.year());\r\n\r\n                if (startDecade.isSame(moment({ y: 2000 })) || (options.maxDate && options.maxDate.isBefore(endDecade, 'y'))) {\r\n                    decadesViewHeader.eq(2).addClass('disabled');\r\n                }\r\n\r\n                while (!startDecade.isAfter(endDecade, 'y')) {\r\n                    endDecadeYear = startDecade.year() + 12;\r\n                    minDateDecade = options.minDate && options.minDate.isAfter(startDecade, 'y') && options.minDate.year() <= endDecadeYear;\r\n                    maxDateDecade = options.maxDate && options.maxDate.isAfter(startDecade, 'y') && options.maxDate.year() <= endDecadeYear;\r\n                    html += '<span data-action=\"selectDecade\" class=\"decade' + (date.isAfter(startDecade) && date.year() <= endDecadeYear ? ' active' : '') +\r\n                        (!isValid(startDecade, 'y') && !minDateDecade && !maxDateDecade ? ' disabled' : '') + '\" data-selection=\"' + (startDecade.year() + 6) + '\">' + (startDecade.year() + 1) + ' - ' + (startDecade.year() + 12) + '</span>';\r\n                    startDecade.add(12, 'y');\r\n                }\r\n                html += '<span></span><span></span><span></span>'; //push the dangling block over, at least this way it's even\r\n\r\n                decadesView.find('td').html(html);\r\n                decadesViewHeader.eq(1).text((startedAt.year() + 1) + '-' + (startDecade.year()));\r\n            },\r\n\r\n            fillDate = function () {\r\n                var daysView = widget.find('.datepicker-days'),\r\n                    daysViewHeader = daysView.find('th'),\r\n                    currentDate,\r\n                    html = [],\r\n                    row,\r\n                    clsName,\r\n                    i;\r\n\r\n                if (!hasDate()) {\r\n                    return;\r\n                }\r\n\r\n                daysViewHeader.eq(0).find('span').attr('title', options.tooltips.prevMonth);\r\n                daysViewHeader.eq(1).attr('title', options.tooltips.selectMonth);\r\n                daysViewHeader.eq(2).find('span').attr('title', options.tooltips.nextMonth);\r\n\r\n                daysView.find('.disabled').removeClass('disabled');\r\n                daysViewHeader.eq(1).text(viewDate.format(options.dayViewHeaderFormat));\r\n\r\n                if (!isValid(viewDate.clone().subtract(1, 'M'), 'M')) {\r\n                    daysViewHeader.eq(0).addClass('disabled');\r\n                }\r\n                if (!isValid(viewDate.clone().add(1, 'M'), 'M')) {\r\n                    daysViewHeader.eq(2).addClass('disabled');\r\n                }\r\n\r\n                currentDate = viewDate.clone().startOf('M').startOf('w').startOf('d');\r\n\r\n                for (i = 0; i < 42; i++) { //always display 42 days (should show 6 weeks)\r\n                    if (currentDate.weekday() === 0) {\r\n                        row = $('<tr>');\r\n                        if (options.calendarWeeks) {\r\n                            row.append('<td class=\"cw\">' + currentDate.week() + '</td>');\r\n                        }\r\n                        html.push(row);\r\n                    }\r\n                    clsName = '';\r\n                    if (currentDate.isBefore(viewDate, 'M')) {\r\n                        clsName += ' old';\r\n                    }\r\n                    if (currentDate.isAfter(viewDate, 'M')) {\r\n                        clsName += ' new';\r\n                    }\r\n                    if (currentDate.isSame(date, 'd') && !unset) {\r\n                        clsName += ' active';\r\n                    }\r\n                    if (!isValid(currentDate, 'd')) {\r\n                        clsName += ' disabled';\r\n                    }\r\n                    if (currentDate.isSame(getMoment(), 'd')) {\r\n                        clsName += ' today';\r\n                    }\r\n                    if (currentDate.day() === 0 || currentDate.day() === 6) {\r\n                        clsName += ' weekend';\r\n                    }\r\n                    row.append('<td data-action=\"selectDay\" data-day=\"' + currentDate.format('L') + '\" class=\"day' + clsName + '\">' + currentDate.date() + '</td>');\r\n                    currentDate.add(1, 'd');\r\n                }\r\n\r\n                daysView.find('tbody').empty().append(html);\r\n\r\n                updateMonths();\r\n\r\n                updateYears();\r\n\r\n                updateDecades();\r\n            },\r\n\r\n            fillHours = function () {\r\n                var table = widget.find('.timepicker-hours table'),\r\n                    currentHour = viewDate.clone().startOf('d'),\r\n                    html = [],\r\n                    row = $('<tr>');\r\n\r\n                if (viewDate.hour() > 11 && !use24Hours) {\r\n                    currentHour.hour(12);\r\n                }\r\n                while (currentHour.isSame(viewDate, 'd') && (use24Hours || (viewDate.hour() < 12 && currentHour.hour() < 12) || viewDate.hour() > 11)) {\r\n                    if (currentHour.hour() % 4 === 0) {\r\n                        row = $('<tr>');\r\n                        html.push(row);\r\n                    }\r\n                    row.append('<td data-action=\"selectHour\" class=\"hour' + (!isValid(currentHour, 'h') ? ' disabled' : '') + '\">' + currentHour.format(use24Hours ? 'HH' : 'hh') + '</td>');\r\n                    currentHour.add(1, 'h');\r\n                }\r\n                table.empty().append(html);\r\n            },\r\n\r\n            fillMinutes = function () {\r\n                var table = widget.find('.timepicker-minutes table'),\r\n                    currentMinute = viewDate.clone().startOf('h'),\r\n                    html = [],\r\n                    row = $('<tr>'),\r\n                    step = options.stepping === 1 ? 5 : options.stepping;\r\n\r\n                while (viewDate.isSame(currentMinute, 'h')) {\r\n                    if (currentMinute.minute() % (step * 4) === 0) {\r\n                        row = $('<tr>');\r\n                        html.push(row);\r\n                    }\r\n                    row.append('<td data-action=\"selectMinute\" class=\"minute' + (!isValid(currentMinute, 'm') ? ' disabled' : '') + '\">' + currentMinute.format('mm') + '</td>');\r\n                    currentMinute.add(step, 'm');\r\n                }\r\n                table.empty().append(html);\r\n            },\r\n\r\n            fillSeconds = function () {\r\n                var table = widget.find('.timepicker-seconds table'),\r\n                    currentSecond = viewDate.clone().startOf('m'),\r\n                    html = [],\r\n                    row = $('<tr>');\r\n\r\n                while (viewDate.isSame(currentSecond, 'm')) {\r\n                    if (currentSecond.second() % 20 === 0) {\r\n                        row = $('<tr>');\r\n                        html.push(row);\r\n                    }\r\n                    row.append('<td data-action=\"selectSecond\" class=\"second' + (!isValid(currentSecond, 's') ? ' disabled' : '') + '\">' + currentSecond.format('ss') + '</td>');\r\n                    currentSecond.add(5, 's');\r\n                }\r\n\r\n                table.empty().append(html);\r\n            },\r\n\r\n            fillTime = function () {\r\n                var toggle, newDate, timeComponents = widget.find('.timepicker span[data-time-component]');\r\n\r\n                if (!use24Hours) {\r\n                    toggle = widget.find('.timepicker [data-action=togglePeriod]');\r\n                    newDate = date.clone().add((date.hours() >= 12) ? -12 : 12, 'h');\r\n\r\n                    toggle.text(date.format('A'));\r\n\r\n                    if (isValid(newDate, 'h')) {\r\n                        toggle.removeClass('disabled');\r\n                    } else {\r\n                        toggle.addClass('disabled');\r\n                    }\r\n                }\r\n                timeComponents.filter('[data-time-component=hours]').text(date.format(use24Hours ? 'HH' : 'hh'));\r\n                timeComponents.filter('[data-time-component=minutes]').text(date.format('mm'));\r\n                timeComponents.filter('[data-time-component=seconds]').text(date.format('ss'));\r\n\r\n                fillHours();\r\n                fillMinutes();\r\n                fillSeconds();\r\n            },\r\n\r\n            update = function () {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                fillDate();\r\n                fillTime();\r\n            },\r\n\r\n            setValue = function (targetMoment) {\r\n                var oldDate = unset ? null : date;\r\n\r\n                // case of calling setValue(null or false)\r\n                if (!targetMoment) {\r\n                    unset = true;\r\n                    input.val('');\r\n                    element.data('date', '');\r\n                    notifyEvent({\r\n                        type: 'dp.change',\r\n                        date: false,\r\n                        oldDate: oldDate\r\n                    });\r\n                    update();\r\n                    return;\r\n                }\r\n\r\n                targetMoment = targetMoment.clone().locale(options.locale);\r\n\r\n                if (hasTimeZone()) {\r\n                    targetMoment.tz(options.timeZone);\r\n                }\r\n\r\n                if (options.stepping !== 1) {\r\n                    targetMoment.minutes((Math.round(targetMoment.minutes() / options.stepping) * options.stepping)).seconds(0);\r\n                }\r\n\r\n                if (isValid(targetMoment)) {\r\n                    date = targetMoment;\r\n                    //viewDate = date.clone(); // TODO this doesn't work right on first use\r\n                    input.val(date.format(actualFormat));\r\n                    element.data('date', date.format(actualFormat));\r\n                    unset = false;\r\n                    update();\r\n                    notifyEvent({\r\n                        type: 'dp.change',\r\n                        date: date.clone(),\r\n                        oldDate: oldDate\r\n                    });\r\n                } else {\r\n                    if (!options.keepInvalid) {\r\n                        input.val(unset ? '' : date.format(actualFormat));\r\n                    } else {\r\n                        notifyEvent({\r\n                            type: 'dp.change',\r\n                            date: targetMoment,\r\n                            oldDate: oldDate\r\n                        });\r\n                    }\r\n                    notifyEvent({\r\n                        type: 'dp.error',\r\n                        date: targetMoment,\r\n                        oldDate: oldDate\r\n                    });\r\n                }\r\n            },\r\n\r\n            /**\r\n             * Hides the widget. Possibly will emit dp.hide\r\n             */\r\n            hide = function () {\r\n                var transitioning = false;\r\n                if (!widget) {\r\n                    return picker;\r\n                }\r\n                // Ignore event if in the middle of a picker transition\r\n                widget.find('.collapse').each(function () {\r\n                    var collapseData = $(this).data('collapse');\r\n                    if (collapseData && collapseData.transitioning) {\r\n                        transitioning = true;\r\n                        return false;\r\n                    }\r\n                    return true;\r\n                });\r\n                if (transitioning) {\r\n                    return picker;\r\n                }\r\n                if (component && component.hasClass('btn')) {\r\n                    component.toggleClass('active');\r\n                }\r\n                widget.hide();\r\n\r\n                $(window).off('resize', place);\r\n                widget.off('click', '[data-action]');\r\n                widget.off('mousedown', false);\r\n\r\n                widget.remove();\r\n                widget = false;\r\n\r\n                notifyEvent({\r\n                    type: 'dp.hide',\r\n                    date: date.clone()\r\n                });\r\n\r\n                input.blur();\r\n\r\n                currentViewMode = 0;\r\n                viewDate = date.clone();\r\n\r\n                return picker;\r\n            },\r\n\r\n            clear = function () {\r\n                setValue(null);\r\n            },\r\n\r\n            parseInputDate = function (inputDate) {\r\n                if (options.parseInputDate === undefined) {\r\n                    if (!moment.isMoment(inputDate)) {\r\n                        inputDate = getMoment(inputDate);\r\n                    }\r\n                } else {\r\n                    inputDate = options.parseInputDate(inputDate);\r\n                }\r\n                //inputDate.locale(options.locale);\r\n                return inputDate;\r\n            },\r\n\r\n            /********************************************************************************\r\n             *\r\n             * Widget UI interaction functions\r\n             *\r\n             ********************************************************************************/\r\n            actions = {\r\n                next: function () {\r\n                    var navFnc = datePickerModes[currentViewMode].navFnc;\r\n                    viewDate.add(datePickerModes[currentViewMode].navStep, navFnc);\r\n                    fillDate();\r\n                    viewUpdate(navFnc);\r\n                },\r\n\r\n                previous: function () {\r\n                    var navFnc = datePickerModes[currentViewMode].navFnc;\r\n                    viewDate.subtract(datePickerModes[currentViewMode].navStep, navFnc);\r\n                    fillDate();\r\n                    viewUpdate(navFnc);\r\n                },\r\n\r\n                pickerSwitch: function () {\r\n                    showMode(1);\r\n                },\r\n\r\n                selectMonth: function (e) {\r\n                    var month = $(e.target).closest('tbody').find('span').index($(e.target));\r\n                    viewDate.month(month);\r\n                    if (currentViewMode === minViewModeNumber) {\r\n                        setValue(date.clone().year(viewDate.year()).month(viewDate.month()));\r\n                        if (!options.inline) {\r\n                            hide();\r\n                        }\r\n                    } else {\r\n                        showMode(-1);\r\n                        fillDate();\r\n                    }\r\n                    viewUpdate('M');\r\n                },\r\n\r\n                selectYear: function (e) {\r\n                    var year = parseInt($(e.target).text(), 10) || 0;\r\n                    viewDate.year(year);\r\n                    if (currentViewMode === minViewModeNumber) {\r\n                        setValue(date.clone().year(viewDate.year()));\r\n                        if (!options.inline) {\r\n                            hide();\r\n                        }\r\n                    } else {\r\n                        showMode(-1);\r\n                        fillDate();\r\n                    }\r\n                    viewUpdate('YYYY');\r\n                },\r\n\r\n                selectDecade: function (e) {\r\n                    var year = parseInt($(e.target).data('selection'), 10) || 0;\r\n                    viewDate.year(year);\r\n                    if (currentViewMode === minViewModeNumber) {\r\n                        setValue(date.clone().year(viewDate.year()));\r\n                        if (!options.inline) {\r\n                            hide();\r\n                        }\r\n                    } else {\r\n                        showMode(-1);\r\n                        fillDate();\r\n                    }\r\n                    viewUpdate('YYYY');\r\n                },\r\n\r\n                selectDay: function (e) {\r\n                    var day = viewDate.clone();\r\n                    if ($(e.target).is('.old')) {\r\n                        day.subtract(1, 'M');\r\n                    }\r\n                    if ($(e.target).is('.new')) {\r\n                        day.add(1, 'M');\r\n                    }\r\n                    setValue(day.date(parseInt($(e.target).text(), 10)));\r\n                    if (!hasTime() && !options.keepOpen && !options.inline) {\r\n                        hide();\r\n                    }\r\n                },\r\n\r\n                incrementHours: function () {\r\n                    var newDate = date.clone().add(1, 'h');\r\n                    if (isValid(newDate, 'h')) {\r\n                        setValue(newDate);\r\n                    }\r\n                },\r\n\r\n                incrementMinutes: function () {\r\n                    var newDate = date.clone().add(options.stepping, 'm');\r\n                    if (isValid(newDate, 'm')) {\r\n                        setValue(newDate);\r\n                    }\r\n                },\r\n\r\n                incrementSeconds: function () {\r\n                    var newDate = date.clone().add(1, 's');\r\n                    if (isValid(newDate, 's')) {\r\n                        setValue(newDate);\r\n                    }\r\n                },\r\n\r\n                decrementHours: function () {\r\n                    var newDate = date.clone().subtract(1, 'h');\r\n                    if (isValid(newDate, 'h')) {\r\n                        setValue(newDate);\r\n                    }\r\n                },\r\n\r\n                decrementMinutes: function () {\r\n                    var newDate = date.clone().subtract(options.stepping, 'm');\r\n                    if (isValid(newDate, 'm')) {\r\n                        setValue(newDate);\r\n                    }\r\n                },\r\n\r\n                decrementSeconds: function () {\r\n                    var newDate = date.clone().subtract(1, 's');\r\n                    if (isValid(newDate, 's')) {\r\n                        setValue(newDate);\r\n                    }\r\n                },\r\n\r\n                togglePeriod: function () {\r\n                    setValue(date.clone().add((date.hours() >= 12) ? -12 : 12, 'h'));\r\n                },\r\n\r\n                togglePicker: function (e) {\r\n                    var $this = $(e.target),\r\n                        $parent = $this.closest('ul'),\r\n                        expanded = $parent.find('.in'),\r\n                        closed = $parent.find('.collapse:not(.in)'),\r\n                        collapseData;\r\n\r\n                    if (expanded && expanded.length) {\r\n                        collapseData = expanded.data('collapse');\r\n                        if (collapseData && collapseData.transitioning) {\r\n                            return;\r\n                        }\r\n                        if (expanded.collapse) { // if collapse plugin is available through bootstrap.js then use it\r\n                            expanded.collapse('hide');\r\n                            closed.collapse('show');\r\n                        } else { // otherwise just toggle in class on the two views\r\n                            expanded.removeClass('in');\r\n                            closed.addClass('in');\r\n                        }\r\n                        if ($this.is('span')) {\r\n                            $this.toggleClass(options.icons.time + ' ' + options.icons.date);\r\n                        } else {\r\n                            $this.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);\r\n                        }\r\n\r\n                        // NOTE: uncomment if toggled state will be restored in show()\r\n                        //if (component) {\r\n                        //    component.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);\r\n                        //}\r\n                    }\r\n                },\r\n\r\n                showPicker: function () {\r\n                    widget.find('.timepicker > div:not(.timepicker-picker)').hide();\r\n                    widget.find('.timepicker .timepicker-picker').show();\r\n                },\r\n\r\n                showHours: function () {\r\n                    widget.find('.timepicker .timepicker-picker').hide();\r\n                    widget.find('.timepicker .timepicker-hours').show();\r\n                },\r\n\r\n                showMinutes: function () {\r\n                    widget.find('.timepicker .timepicker-picker').hide();\r\n                    widget.find('.timepicker .timepicker-minutes').show();\r\n                },\r\n\r\n                showSeconds: function () {\r\n                    widget.find('.timepicker .timepicker-picker').hide();\r\n                    widget.find('.timepicker .timepicker-seconds').show();\r\n                },\r\n\r\n                selectHour: function (e) {\r\n                    var hour = parseInt($(e.target).text(), 10);\r\n\r\n                    if (!use24Hours) {\r\n                        if (date.hours() >= 12) {\r\n                            if (hour !== 12) {\r\n                                hour += 12;\r\n                            }\r\n                        } else {\r\n                            if (hour === 12) {\r\n                                hour = 0;\r\n                            }\r\n                        }\r\n                    }\r\n                    setValue(date.clone().hours(hour));\r\n                    actions.showPicker.call(picker);\r\n                },\r\n\r\n                selectMinute: function (e) {\r\n                    setValue(date.clone().minutes(parseInt($(e.target).text(), 10)));\r\n                    actions.showPicker.call(picker);\r\n                },\r\n\r\n                selectSecond: function (e) {\r\n                    setValue(date.clone().seconds(parseInt($(e.target).text(), 10)));\r\n                    actions.showPicker.call(picker);\r\n                },\r\n\r\n                clear: clear,\r\n\r\n                today: function () {\r\n                    var todaysDate = getMoment();\r\n                    if (isValid(todaysDate, 'd')) {\r\n                        setValue(todaysDate);\r\n                    }\r\n                },\r\n\r\n                close: hide\r\n            },\r\n\r\n            doAction = function (e) {\r\n                if ($(e.currentTarget).is('.disabled')) {\r\n                    return false;\r\n                }\r\n                actions[$(e.currentTarget).data('action')].apply(picker, arguments);\r\n                return false;\r\n            },\r\n\r\n            /**\r\n             * Shows the widget. Possibly will emit dp.show and dp.change\r\n             */\r\n            show = function () {\r\n                var currentMoment,\r\n                    useCurrentGranularity = {\r\n                        'year': function (m) {\r\n                            return m.month(0).date(1).hours(0).seconds(0).minutes(0);\r\n                        },\r\n                        'month': function (m) {\r\n                            return m.date(1).hours(0).seconds(0).minutes(0);\r\n                        },\r\n                        'day': function (m) {\r\n                            return m.hours(0).seconds(0).minutes(0);\r\n                        },\r\n                        'hour': function (m) {\r\n                            return m.seconds(0).minutes(0);\r\n                        },\r\n                        'minute': function (m) {\r\n                            return m.seconds(0);\r\n                        }\r\n                    };\r\n\r\n                if (input.prop('disabled') || (!options.ignoreReadonly && input.prop('readonly')) || widget) {\r\n                    return picker;\r\n                }\r\n                if (input.val() !== undefined && input.val().trim().length !== 0) {\r\n                    setValue(parseInputDate(input.val().trim()));\r\n                } else if (unset && options.useCurrent && (options.inline || (input.is('input') && input.val().trim().length === 0))) {\r\n                    currentMoment = getMoment();\r\n                    if (typeof options.useCurrent === 'string') {\r\n                        currentMoment = useCurrentGranularity[options.useCurrent](currentMoment);\r\n                    }\r\n                    setValue(currentMoment);\r\n                }\r\n                widget = getTemplate();\r\n\r\n                fillDow();\r\n                fillMonths();\r\n\r\n                widget.find('.timepicker-hours').hide();\r\n                widget.find('.timepicker-minutes').hide();\r\n                widget.find('.timepicker-seconds').hide();\r\n\r\n                update();\r\n                showMode();\r\n\r\n                $(window).on('resize', place);\r\n                widget.on('click', '[data-action]', doAction); // this handles clicks on the widget\r\n                widget.on('mousedown', false);\r\n\r\n                if (component && component.hasClass('btn')) {\r\n                    component.toggleClass('active');\r\n                }\r\n                place();\r\n                widget.show();\r\n                if (options.focusOnShow && !input.is(':focus')) {\r\n                    input.focus();\r\n                }\r\n\r\n                notifyEvent({\r\n                    type: 'dp.show'\r\n                });\r\n                return picker;\r\n            },\r\n\r\n            /**\r\n             * Shows or hides the widget\r\n             */\r\n            toggle = function () {\r\n                return (widget ? hide() : show());\r\n            },\r\n\r\n            keydown = function (e) {\r\n                var handler = null,\r\n                    index,\r\n                    index2,\r\n                    pressedKeys = [],\r\n                    pressedModifiers = {},\r\n                    currentKey = e.which,\r\n                    keyBindKeys,\r\n                    allModifiersPressed,\r\n                    pressed = 'p';\r\n\r\n                keyState[currentKey] = pressed;\r\n\r\n                for (index in keyState) {\r\n                    if (keyState.hasOwnProperty(index) && keyState[index] === pressed) {\r\n                        pressedKeys.push(index);\r\n                        if (parseInt(index, 10) !== currentKey) {\r\n                            pressedModifiers[index] = true;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                for (index in options.keyBinds) {\r\n                    if (options.keyBinds.hasOwnProperty(index) && typeof (options.keyBinds[index]) === 'function') {\r\n                        keyBindKeys = index.split(' ');\r\n                        if (keyBindKeys.length === pressedKeys.length && keyMap[currentKey] === keyBindKeys[keyBindKeys.length - 1]) {\r\n                            allModifiersPressed = true;\r\n                            for (index2 = keyBindKeys.length - 2; index2 >= 0; index2--) {\r\n                                if (!(keyMap[keyBindKeys[index2]] in pressedModifiers)) {\r\n                                    allModifiersPressed = false;\r\n                                    break;\r\n                                }\r\n                            }\r\n                            if (allModifiersPressed) {\r\n                                handler = options.keyBinds[index];\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (handler) {\r\n                    handler.call(picker, widget);\r\n                    e.stopPropagation();\r\n                    e.preventDefault();\r\n                }\r\n            },\r\n\r\n            keyup = function (e) {\r\n                keyState[e.which] = 'r';\r\n                e.stopPropagation();\r\n                e.preventDefault();\r\n            },\r\n\r\n            change = function (e) {\r\n                var val = $(e.target).val().trim(),\r\n                    parsedDate = val ? parseInputDate(val) : null;\r\n                setValue(parsedDate);\r\n                e.stopImmediatePropagation();\r\n                return false;\r\n            },\r\n\r\n            attachDatePickerElementEvents = function () {\r\n                input.on({\r\n                    'change': change,\r\n                    'blur': options.debug ? '' : hide,\r\n                    'keydown': keydown,\r\n                    'keyup': keyup,\r\n                    'focus': options.allowInputToggle ? show : ''\r\n                });\r\n\r\n                if (element.is('input')) {\r\n                    input.on({\r\n                        'focus': show\r\n                    });\r\n                } else if (component) {\r\n                    component.on('click', toggle);\r\n                    component.on('mousedown', false);\r\n                }\r\n            },\r\n\r\n            detachDatePickerElementEvents = function () {\r\n                input.off({\r\n                    'change': change,\r\n                    'blur': blur,\r\n                    'keydown': keydown,\r\n                    'keyup': keyup,\r\n                    'focus': options.allowInputToggle ? hide : ''\r\n                });\r\n\r\n                if (element.is('input')) {\r\n                    input.off({\r\n                        'focus': show\r\n                    });\r\n                } else if (component) {\r\n                    component.off('click', toggle);\r\n                    component.off('mousedown', false);\r\n                }\r\n            },\r\n\r\n            indexGivenDates = function (givenDatesArray) {\r\n                // Store given enabledDates and disabledDates as keys.\r\n                // This way we can check their existence in O(1) time instead of looping through whole array.\r\n                // (for example: options.enabledDates['2014-02-27'] === true)\r\n                var givenDatesIndexed = {};\r\n                $.each(givenDatesArray, function () {\r\n                    var dDate = parseInputDate(this);\r\n                    if (dDate.isValid()) {\r\n                        givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;\r\n                    }\r\n                });\r\n                return (Object.keys(givenDatesIndexed).length) ? givenDatesIndexed : false;\r\n            },\r\n\r\n            indexGivenHours = function (givenHoursArray) {\r\n                // Store given enabledHours and disabledHours as keys.\r\n                // This way we can check their existence in O(1) time instead of looping through whole array.\r\n                // (for example: options.enabledHours['2014-02-27'] === true)\r\n                var givenHoursIndexed = {};\r\n                $.each(givenHoursArray, function () {\r\n                    givenHoursIndexed[this] = true;\r\n                });\r\n                return (Object.keys(givenHoursIndexed).length) ? givenHoursIndexed : false;\r\n            },\r\n\r\n            initFormatting = function () {\r\n                var format = options.format || 'L LT';\r\n\r\n                actualFormat = format.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput) {\r\n                    var newinput = date.localeData().longDateFormat(formatInput) || formatInput;\r\n                    return newinput.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput2) { //temp fix for #740\r\n                        return date.localeData().longDateFormat(formatInput2) || formatInput2;\r\n                    });\r\n                });\r\n\r\n\r\n                parseFormats = options.extraFormats ? options.extraFormats.slice() : [];\r\n                if (parseFormats.indexOf(format) < 0 && parseFormats.indexOf(actualFormat) < 0) {\r\n                    parseFormats.push(actualFormat);\r\n                }\r\n\r\n                use24Hours = (actualFormat.toLowerCase().indexOf('a') < 1 && actualFormat.replace(/\\[.*?\\]/g, '').indexOf('h') < 1);\r\n\r\n                if (isEnabled('y')) {\r\n                    minViewModeNumber = 2;\r\n                }\r\n                if (isEnabled('M')) {\r\n                    minViewModeNumber = 1;\r\n                }\r\n                if (isEnabled('d')) {\r\n                    minViewModeNumber = 0;\r\n                }\r\n\r\n                currentViewMode = Math.max(minViewModeNumber, currentViewMode);\r\n\r\n                if (!unset) {\r\n                    setValue(date);\r\n                }\r\n            };\r\n\r\n        /********************************************************************************\r\n         *\r\n         * Public API functions\r\n         * =====================\r\n         *\r\n         * Important: Do not expose direct references to private objects or the options\r\n         * object to the outer world. Always return a clone when returning values or make\r\n         * a clone when setting a private variable.\r\n         *\r\n         ********************************************************************************/\r\n        picker.destroy = function () {\r\n            ///<summary>Destroys the widget and removes all attached event listeners</summary>\r\n            hide();\r\n            detachDatePickerElementEvents();\r\n            element.removeData('DateTimePicker');\r\n            element.removeData('date');\r\n        };\r\n\r\n        picker.toggle = toggle;\r\n\r\n        picker.show = show;\r\n\r\n        picker.hide = hide;\r\n\r\n        picker.disable = function () {\r\n            ///<summary>Disables the input element, the component is attached to, by adding a disabled=\"true\" attribute to it.\r\n            ///If the widget was visible before that call it is hidden. Possibly emits dp.hide</summary>\r\n            hide();\r\n            if (component && component.hasClass('btn')) {\r\n                component.addClass('disabled');\r\n            }\r\n            input.prop('disabled', true);\r\n            return picker;\r\n        };\r\n\r\n        picker.enable = function () {\r\n            ///<summary>Enables the input element, the component is attached to, by removing disabled attribute from it.</summary>\r\n            if (component && component.hasClass('btn')) {\r\n                component.removeClass('disabled');\r\n            }\r\n            input.prop('disabled', false);\r\n            return picker;\r\n        };\r\n\r\n        picker.ignoreReadonly = function (ignoreReadonly) {\r\n            if (arguments.length === 0) {\r\n                return options.ignoreReadonly;\r\n            }\r\n            if (typeof ignoreReadonly !== 'boolean') {\r\n                throw new TypeError('ignoreReadonly () expects a boolean parameter');\r\n            }\r\n            options.ignoreReadonly = ignoreReadonly;\r\n            return picker;\r\n        };\r\n\r\n        picker.options = function (newOptions) {\r\n            if (arguments.length === 0) {\r\n                return $.extend(true, {}, options);\r\n            }\r\n\r\n            if (!(newOptions instanceof Object)) {\r\n                throw new TypeError('options() options parameter should be an object');\r\n            }\r\n            $.extend(true, options, newOptions);\r\n            $.each(options, function (key, value) {\r\n                if (picker[key] !== undefined) {\r\n                    picker[key](value);\r\n                } else {\r\n                    throw new TypeError('option ' + key + ' is not recognized!');\r\n                }\r\n            });\r\n            return picker;\r\n        };\r\n\r\n        picker.date = function (newDate) {\r\n            ///<signature helpKeyword=\"$.fn.datetimepicker.date\">\r\n            ///<summary>Returns the component's model current date, a moment object or null if not set.</summary>\r\n            ///<returns type=\"Moment\">date.clone()</returns>\r\n            ///</signature>\r\n            ///<signature>\r\n            ///<summary>Sets the components model current moment to it. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.</summary>\r\n            ///<param name=\"newDate\" locid=\"$.fn.datetimepicker.date_p:newDate\">Takes string, Date, moment, null parameter.</param>\r\n            ///</signature>\r\n            if (arguments.length === 0) {\r\n                if (unset) {\r\n                    return null;\r\n                }\r\n                return date.clone();\r\n            }\r\n\r\n            if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {\r\n                throw new TypeError('date() parameter must be one of [null, string, moment or Date]');\r\n            }\r\n\r\n            setValue(newDate === null ? null : parseInputDate(newDate));\r\n            return picker;\r\n        };\r\n\r\n        picker.format = function (newFormat) {\r\n            ///<summary>test su</summary>\r\n            ///<param name=\"newFormat\">info about para</param>\r\n            ///<returns type=\"string|boolean\">returns foo</returns>\r\n            if (arguments.length === 0) {\r\n                return options.format;\r\n            }\r\n\r\n            if ((typeof newFormat !== 'string') && ((typeof newFormat !== 'boolean') || (newFormat !== false))) {\r\n                throw new TypeError('format() expects a string or boolean:false parameter ' + newFormat);\r\n            }\r\n\r\n            options.format = newFormat;\r\n            if (actualFormat) {\r\n                initFormatting(); // reinit formatting\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.timeZone = function (newZone) {\r\n            if (arguments.length === 0) {\r\n                return options.timeZone;\r\n            }\r\n\r\n            if (typeof newZone !== 'string') {\r\n                throw new TypeError('newZone() expects a string parameter');\r\n            }\r\n\r\n            options.timeZone = newZone;\r\n\r\n            return picker;\r\n        };\r\n\r\n        picker.dayViewHeaderFormat = function (newFormat) {\r\n            if (arguments.length === 0) {\r\n                return options.dayViewHeaderFormat;\r\n            }\r\n\r\n            if (typeof newFormat !== 'string') {\r\n                throw new TypeError('dayViewHeaderFormat() expects a string parameter');\r\n            }\r\n\r\n            options.dayViewHeaderFormat = newFormat;\r\n            return picker;\r\n        };\r\n\r\n        picker.extraFormats = function (formats) {\r\n            if (arguments.length === 0) {\r\n                return options.extraFormats;\r\n            }\r\n\r\n            if (formats !== false && !(formats instanceof Array)) {\r\n                throw new TypeError('extraFormats() expects an array or false parameter');\r\n            }\r\n\r\n            options.extraFormats = formats;\r\n            if (parseFormats) {\r\n                initFormatting(); // reinit formatting\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.disabledDates = function (dates) {\r\n            ///<signature helpKeyword=\"$.fn.datetimepicker.disabledDates\">\r\n            ///<summary>Returns an array with the currently set disabled dates on the component.</summary>\r\n            ///<returns type=\"array\">options.disabledDates</returns>\r\n            ///</signature>\r\n            ///<signature>\r\n            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of\r\n            ///options.enabledDates if such exist.</summary>\r\n            ///<param name=\"dates\" locid=\"$.fn.datetimepicker.disabledDates_p:dates\">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>\r\n            ///</signature>\r\n            if (arguments.length === 0) {\r\n                return (options.disabledDates ? $.extend({}, options.disabledDates) : options.disabledDates);\r\n            }\r\n\r\n            if (!dates) {\r\n                options.disabledDates = false;\r\n                update();\r\n                return picker;\r\n            }\r\n            if (!(dates instanceof Array)) {\r\n                throw new TypeError('disabledDates() expects an array parameter');\r\n            }\r\n            options.disabledDates = indexGivenDates(dates);\r\n            options.enabledDates = false;\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.enabledDates = function (dates) {\r\n            ///<signature helpKeyword=\"$.fn.datetimepicker.enabledDates\">\r\n            ///<summary>Returns an array with the currently set enabled dates on the component.</summary>\r\n            ///<returns type=\"array\">options.enabledDates</returns>\r\n            ///</signature>\r\n            ///<signature>\r\n            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledDates if such exist.</summary>\r\n            ///<param name=\"dates\" locid=\"$.fn.datetimepicker.enabledDates_p:dates\">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>\r\n            ///</signature>\r\n            if (arguments.length === 0) {\r\n                return (options.enabledDates ? $.extend({}, options.enabledDates) : options.enabledDates);\r\n            }\r\n\r\n            if (!dates) {\r\n                options.enabledDates = false;\r\n                update();\r\n                return picker;\r\n            }\r\n            if (!(dates instanceof Array)) {\r\n                throw new TypeError('enabledDates() expects an array parameter');\r\n            }\r\n            options.enabledDates = indexGivenDates(dates);\r\n            options.disabledDates = false;\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.daysOfWeekDisabled = function (daysOfWeekDisabled) {\r\n            if (arguments.length === 0) {\r\n                return options.daysOfWeekDisabled.splice(0);\r\n            }\r\n\r\n            if ((typeof daysOfWeekDisabled === 'boolean') && !daysOfWeekDisabled) {\r\n                options.daysOfWeekDisabled = false;\r\n                update();\r\n                return picker;\r\n            }\r\n\r\n            if (!(daysOfWeekDisabled instanceof Array)) {\r\n                throw new TypeError('daysOfWeekDisabled() expects an array parameter');\r\n            }\r\n            options.daysOfWeekDisabled = daysOfWeekDisabled.reduce(function (previousValue, currentValue) {\r\n                currentValue = parseInt(currentValue, 10);\r\n                if (currentValue > 6 || currentValue < 0 || isNaN(currentValue)) {\r\n                    return previousValue;\r\n                }\r\n                if (previousValue.indexOf(currentValue) === -1) {\r\n                    previousValue.push(currentValue);\r\n                }\r\n                return previousValue;\r\n            }, []).sort();\r\n            if (options.useCurrent && !options.keepInvalid) {\r\n                var tries = 0;\r\n                while (!isValid(date, 'd')) {\r\n                    date.add(1, 'd');\r\n                    if (tries === 31) {\r\n                        throw 'Tried 31 times to find a valid date';\r\n                    }\r\n                    tries++;\r\n                }\r\n                setValue(date);\r\n            }\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.maxDate = function (maxDate) {\r\n            if (arguments.length === 0) {\r\n                return options.maxDate ? options.maxDate.clone() : options.maxDate;\r\n            }\r\n\r\n            if ((typeof maxDate === 'boolean') && maxDate === false) {\r\n                options.maxDate = false;\r\n                update();\r\n                return picker;\r\n            }\r\n\r\n            if (typeof maxDate === 'string') {\r\n                if (maxDate === 'now' || maxDate === 'moment') {\r\n                    maxDate = getMoment();\r\n                }\r\n            }\r\n\r\n            var parsedDate = parseInputDate(maxDate);\r\n\r\n            if (!parsedDate.isValid()) {\r\n                throw new TypeError('maxDate() Could not parse date parameter: ' + maxDate);\r\n            }\r\n            if (options.minDate && parsedDate.isBefore(options.minDate)) {\r\n                throw new TypeError('maxDate() date parameter is before options.minDate: ' + parsedDate.format(actualFormat));\r\n            }\r\n            options.maxDate = parsedDate;\r\n            if (options.useCurrent && !options.keepInvalid && date.isAfter(maxDate)) {\r\n                setValue(options.maxDate);\r\n            }\r\n            if (viewDate.isAfter(parsedDate)) {\r\n                viewDate = parsedDate.clone().subtract(options.stepping, 'm');\r\n            }\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.minDate = function (minDate) {\r\n            if (arguments.length === 0) {\r\n                return options.minDate ? options.minDate.clone() : options.minDate;\r\n            }\r\n\r\n            if ((typeof minDate === 'boolean') && minDate === false) {\r\n                options.minDate = false;\r\n                update();\r\n                return picker;\r\n            }\r\n\r\n            if (typeof minDate === 'string') {\r\n                if (minDate === 'now' || minDate === 'moment') {\r\n                    minDate = getMoment();\r\n                }\r\n            }\r\n\r\n            var parsedDate = parseInputDate(minDate);\r\n\r\n            if (!parsedDate.isValid()) {\r\n                throw new TypeError('minDate() Could not parse date parameter: ' + minDate);\r\n            }\r\n            if (options.maxDate && parsedDate.isAfter(options.maxDate)) {\r\n                throw new TypeError('minDate() date parameter is after options.maxDate: ' + parsedDate.format(actualFormat));\r\n            }\r\n            options.minDate = parsedDate;\r\n            if (options.useCurrent && !options.keepInvalid && date.isBefore(minDate)) {\r\n                setValue(options.minDate);\r\n            }\r\n            if (viewDate.isBefore(parsedDate)) {\r\n                viewDate = parsedDate.clone().add(options.stepping, 'm');\r\n            }\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.defaultDate = function (defaultDate) {\r\n            ///<signature helpKeyword=\"$.fn.datetimepicker.defaultDate\">\r\n            ///<summary>Returns a moment with the options.defaultDate option configuration or false if not set</summary>\r\n            ///<returns type=\"Moment\">date.clone()</returns>\r\n            ///</signature>\r\n            ///<signature>\r\n            ///<summary>Will set the picker's inital date. If a boolean:false value is passed the options.defaultDate parameter is cleared.</summary>\r\n            ///<param name=\"defaultDate\" locid=\"$.fn.datetimepicker.defaultDate_p:defaultDate\">Takes a string, Date, moment, boolean:false</param>\r\n            ///</signature>\r\n            if (arguments.length === 0) {\r\n                return options.defaultDate ? options.defaultDate.clone() : options.defaultDate;\r\n            }\r\n            if (!defaultDate) {\r\n                options.defaultDate = false;\r\n                return picker;\r\n            }\r\n\r\n            if (typeof defaultDate === 'string') {\r\n                if (defaultDate === 'now' || defaultDate === 'moment') {\r\n                    defaultDate = getMoment();\r\n                } else {\r\n                    defaultDate = getMoment(defaultDate);\r\n                }\r\n            }\r\n\r\n            var parsedDate = parseInputDate(defaultDate);\r\n            if (!parsedDate.isValid()) {\r\n                throw new TypeError('defaultDate() Could not parse date parameter: ' + defaultDate);\r\n            }\r\n            if (!isValid(parsedDate)) {\r\n                throw new TypeError('defaultDate() date passed is invalid according to component setup validations');\r\n            }\r\n\r\n            options.defaultDate = parsedDate;\r\n\r\n            if ((options.defaultDate && options.inline) || input.val().trim() === '') {\r\n                setValue(options.defaultDate);\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.locale = function (locale) {\r\n            if (arguments.length === 0) {\r\n                return options.locale;\r\n            }\r\n\r\n            if (!moment.localeData(locale)) {\r\n                throw new TypeError('locale() locale ' + locale + ' is not loaded from moment locales!');\r\n            }\r\n\r\n            options.locale = locale;\r\n            date.locale(options.locale);\r\n            viewDate.locale(options.locale);\r\n\r\n            if (actualFormat) {\r\n                initFormatting(); // reinit formatting\r\n            }\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.stepping = function (stepping) {\r\n            if (arguments.length === 0) {\r\n                return options.stepping;\r\n            }\r\n\r\n            stepping = parseInt(stepping, 10);\r\n            if (isNaN(stepping) || stepping < 1) {\r\n                stepping = 1;\r\n            }\r\n            options.stepping = stepping;\r\n            return picker;\r\n        };\r\n\r\n        picker.useCurrent = function (useCurrent) {\r\n            var useCurrentOptions = ['year', 'month', 'day', 'hour', 'minute'];\r\n            if (arguments.length === 0) {\r\n                return options.useCurrent;\r\n            }\r\n\r\n            if ((typeof useCurrent !== 'boolean') && (typeof useCurrent !== 'string')) {\r\n                throw new TypeError('useCurrent() expects a boolean or string parameter');\r\n            }\r\n            if (typeof useCurrent === 'string' && useCurrentOptions.indexOf(useCurrent.toLowerCase()) === -1) {\r\n                throw new TypeError('useCurrent() expects a string parameter of ' + useCurrentOptions.join(', '));\r\n            }\r\n            options.useCurrent = useCurrent;\r\n            return picker;\r\n        };\r\n\r\n        picker.collapse = function (collapse) {\r\n            if (arguments.length === 0) {\r\n                return options.collapse;\r\n            }\r\n\r\n            if (typeof collapse !== 'boolean') {\r\n                throw new TypeError('collapse() expects a boolean parameter');\r\n            }\r\n            if (options.collapse === collapse) {\r\n                return picker;\r\n            }\r\n            options.collapse = collapse;\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.icons = function (icons) {\r\n            if (arguments.length === 0) {\r\n                return $.extend({}, options.icons);\r\n            }\r\n\r\n            if (!(icons instanceof Object)) {\r\n                throw new TypeError('icons() expects parameter to be an Object');\r\n            }\r\n            $.extend(options.icons, icons);\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.tooltips = function (tooltips) {\r\n            if (arguments.length === 0) {\r\n                return $.extend({}, options.tooltips);\r\n            }\r\n\r\n            if (!(tooltips instanceof Object)) {\r\n                throw new TypeError('tooltips() expects parameter to be an Object');\r\n            }\r\n            $.extend(options.tooltips, tooltips);\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.useStrict = function (useStrict) {\r\n            if (arguments.length === 0) {\r\n                return options.useStrict;\r\n            }\r\n\r\n            if (typeof useStrict !== 'boolean') {\r\n                throw new TypeError('useStrict() expects a boolean parameter');\r\n            }\r\n            options.useStrict = useStrict;\r\n            return picker;\r\n        };\r\n\r\n        picker.sideBySide = function (sideBySide) {\r\n            if (arguments.length === 0) {\r\n                return options.sideBySide;\r\n            }\r\n\r\n            if (typeof sideBySide !== 'boolean') {\r\n                throw new TypeError('sideBySide() expects a boolean parameter');\r\n            }\r\n            options.sideBySide = sideBySide;\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.viewMode = function (viewMode) {\r\n            if (arguments.length === 0) {\r\n                return options.viewMode;\r\n            }\r\n\r\n            if (typeof viewMode !== 'string') {\r\n                throw new TypeError('viewMode() expects a string parameter');\r\n            }\r\n\r\n            if (viewModes.indexOf(viewMode) === -1) {\r\n                throw new TypeError('viewMode() parameter must be one of (' + viewModes.join(', ') + ') value');\r\n            }\r\n\r\n            options.viewMode = viewMode;\r\n            currentViewMode = Math.max(viewModes.indexOf(viewMode), minViewModeNumber);\r\n\r\n            showMode();\r\n            return picker;\r\n        };\r\n\r\n        picker.toolbarPlacement = function (toolbarPlacement) {\r\n            if (arguments.length === 0) {\r\n                return options.toolbarPlacement;\r\n            }\r\n\r\n            if (typeof toolbarPlacement !== 'string') {\r\n                throw new TypeError('toolbarPlacement() expects a string parameter');\r\n            }\r\n            if (toolbarPlacements.indexOf(toolbarPlacement) === -1) {\r\n                throw new TypeError('toolbarPlacement() parameter must be one of (' + toolbarPlacements.join(', ') + ') value');\r\n            }\r\n            options.toolbarPlacement = toolbarPlacement;\r\n\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.widgetPositioning = function (widgetPositioning) {\r\n            if (arguments.length === 0) {\r\n                return $.extend({}, options.widgetPositioning);\r\n            }\r\n\r\n            if (({}).toString.call(widgetPositioning) !== '[object Object]') {\r\n                throw new TypeError('widgetPositioning() expects an object variable');\r\n            }\r\n            if (widgetPositioning.horizontal) {\r\n                if (typeof widgetPositioning.horizontal !== 'string') {\r\n                    throw new TypeError('widgetPositioning() horizontal variable must be a string');\r\n                }\r\n                widgetPositioning.horizontal = widgetPositioning.horizontal.toLowerCase();\r\n                if (horizontalModes.indexOf(widgetPositioning.horizontal) === -1) {\r\n                    throw new TypeError('widgetPositioning() expects horizontal parameter to be one of (' + horizontalModes.join(', ') + ')');\r\n                }\r\n                options.widgetPositioning.horizontal = widgetPositioning.horizontal;\r\n            }\r\n            if (widgetPositioning.vertical) {\r\n                if (typeof widgetPositioning.vertical !== 'string') {\r\n                    throw new TypeError('widgetPositioning() vertical variable must be a string');\r\n                }\r\n                widgetPositioning.vertical = widgetPositioning.vertical.toLowerCase();\r\n                if (verticalModes.indexOf(widgetPositioning.vertical) === -1) {\r\n                    throw new TypeError('widgetPositioning() expects vertical parameter to be one of (' + verticalModes.join(', ') + ')');\r\n                }\r\n                options.widgetPositioning.vertical = widgetPositioning.vertical;\r\n            }\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.calendarWeeks = function (calendarWeeks) {\r\n            if (arguments.length === 0) {\r\n                return options.calendarWeeks;\r\n            }\r\n\r\n            if (typeof calendarWeeks !== 'boolean') {\r\n                throw new TypeError('calendarWeeks() expects parameter to be a boolean value');\r\n            }\r\n\r\n            options.calendarWeeks = calendarWeeks;\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.showTodayButton = function (showTodayButton) {\r\n            if (arguments.length === 0) {\r\n                return options.showTodayButton;\r\n            }\r\n\r\n            if (typeof showTodayButton !== 'boolean') {\r\n                throw new TypeError('showTodayButton() expects a boolean parameter');\r\n            }\r\n\r\n            options.showTodayButton = showTodayButton;\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.showClear = function (showClear) {\r\n            if (arguments.length === 0) {\r\n                return options.showClear;\r\n            }\r\n\r\n            if (typeof showClear !== 'boolean') {\r\n                throw new TypeError('showClear() expects a boolean parameter');\r\n            }\r\n\r\n            options.showClear = showClear;\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.widgetParent = function (widgetParent) {\r\n            if (arguments.length === 0) {\r\n                return options.widgetParent;\r\n            }\r\n\r\n            if (typeof widgetParent === 'string') {\r\n                widgetParent = $(widgetParent);\r\n            }\r\n\r\n            if (widgetParent !== null && (typeof widgetParent !== 'string' && !(widgetParent instanceof $))) {\r\n                throw new TypeError('widgetParent() expects a string or a jQuery object parameter');\r\n            }\r\n\r\n            options.widgetParent = widgetParent;\r\n            if (widget) {\r\n                hide();\r\n                show();\r\n            }\r\n            return picker;\r\n        };\r\n\r\n        picker.keepOpen = function (keepOpen) {\r\n            if (arguments.length === 0) {\r\n                return options.keepOpen;\r\n            }\r\n\r\n            if (typeof keepOpen !== 'boolean') {\r\n                throw new TypeError('keepOpen() expects a boolean parameter');\r\n            }\r\n\r\n            options.keepOpen = keepOpen;\r\n            return picker;\r\n        };\r\n\r\n        picker.focusOnShow = function (focusOnShow) {\r\n            if (arguments.length === 0) {\r\n                return options.focusOnShow;\r\n            }\r\n\r\n            if (typeof focusOnShow !== 'boolean') {\r\n                throw new TypeError('focusOnShow() expects a boolean parameter');\r\n            }\r\n\r\n            options.focusOnShow = focusOnShow;\r\n            return picker;\r\n        };\r\n\r\n        picker.inline = function (inline) {\r\n            if (arguments.length === 0) {\r\n                return options.inline;\r\n            }\r\n\r\n            if (typeof inline !== 'boolean') {\r\n                throw new TypeError('inline() expects a boolean parameter');\r\n            }\r\n\r\n            options.inline = inline;\r\n            return picker;\r\n        };\r\n\r\n        picker.clear = function () {\r\n            clear();\r\n            return picker;\r\n        };\r\n\r\n        picker.keyBinds = function (keyBinds) {\r\n            if (arguments.length === 0) {\r\n                return options.keyBinds;\r\n            }\r\n\r\n            options.keyBinds = keyBinds;\r\n            return picker;\r\n        };\r\n\r\n        picker.getMoment = function (d) {\r\n            return getMoment(d);\r\n        };\r\n\r\n        picker.debug = function (debug) {\r\n            if (typeof debug !== 'boolean') {\r\n                throw new TypeError('debug() expects a boolean parameter');\r\n            }\r\n\r\n            options.debug = debug;\r\n            return picker;\r\n        };\r\n\r\n        picker.allowInputToggle = function (allowInputToggle) {\r\n            if (arguments.length === 0) {\r\n                return options.allowInputToggle;\r\n            }\r\n\r\n            if (typeof allowInputToggle !== 'boolean') {\r\n                throw new TypeError('allowInputToggle() expects a boolean parameter');\r\n            }\r\n\r\n            options.allowInputToggle = allowInputToggle;\r\n            return picker;\r\n        };\r\n\r\n        picker.showClose = function (showClose) {\r\n            if (arguments.length === 0) {\r\n                return options.showClose;\r\n            }\r\n\r\n            if (typeof showClose !== 'boolean') {\r\n                throw new TypeError('showClose() expects a boolean parameter');\r\n            }\r\n\r\n            options.showClose = showClose;\r\n            return picker;\r\n        };\r\n\r\n        picker.keepInvalid = function (keepInvalid) {\r\n            if (arguments.length === 0) {\r\n                return options.keepInvalid;\r\n            }\r\n\r\n            if (typeof keepInvalid !== 'boolean') {\r\n                throw new TypeError('keepInvalid() expects a boolean parameter');\r\n            }\r\n            options.keepInvalid = keepInvalid;\r\n            return picker;\r\n        };\r\n\r\n        picker.datepickerInput = function (datepickerInput) {\r\n            if (arguments.length === 0) {\r\n                return options.datepickerInput;\r\n            }\r\n\r\n            if (typeof datepickerInput !== 'string') {\r\n                throw new TypeError('datepickerInput() expects a string parameter');\r\n            }\r\n\r\n            options.datepickerInput = datepickerInput;\r\n            return picker;\r\n        };\r\n\r\n        picker.parseInputDate = function (parseInputDate) {\r\n            if (arguments.length === 0) {\r\n                return options.parseInputDate;\r\n            }\r\n\r\n            if (typeof parseInputDate !== 'function') {\r\n                throw new TypeError('parseInputDate() sholud be as function');\r\n            }\r\n\r\n            options.parseInputDate = parseInputDate;\r\n\r\n            return picker;\r\n        };\r\n\r\n        picker.disabledTimeIntervals = function (disabledTimeIntervals) {\r\n            ///<signature helpKeyword=\"$.fn.datetimepicker.disabledTimeIntervals\">\r\n            ///<summary>Returns an array with the currently set disabled dates on the component.</summary>\r\n            ///<returns type=\"array\">options.disabledTimeIntervals</returns>\r\n            ///</signature>\r\n            ///<signature>\r\n            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of\r\n            ///options.enabledDates if such exist.</summary>\r\n            ///<param name=\"dates\" locid=\"$.fn.datetimepicker.disabledTimeIntervals_p:dates\">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>\r\n            ///</signature>\r\n            if (arguments.length === 0) {\r\n                return (options.disabledTimeIntervals ? $.extend({}, options.disabledTimeIntervals) : options.disabledTimeIntervals);\r\n            }\r\n\r\n            if (!disabledTimeIntervals) {\r\n                options.disabledTimeIntervals = false;\r\n                update();\r\n                return picker;\r\n            }\r\n            if (!(disabledTimeIntervals instanceof Array)) {\r\n                throw new TypeError('disabledTimeIntervals() expects an array parameter');\r\n            }\r\n            options.disabledTimeIntervals = disabledTimeIntervals;\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.disabledHours = function (hours) {\r\n            ///<signature helpKeyword=\"$.fn.datetimepicker.disabledHours\">\r\n            ///<summary>Returns an array with the currently set disabled hours on the component.</summary>\r\n            ///<returns type=\"array\">options.disabledHours</returns>\r\n            ///</signature>\r\n            ///<signature>\r\n            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of\r\n            ///options.enabledHours if such exist.</summary>\r\n            ///<param name=\"hours\" locid=\"$.fn.datetimepicker.disabledHours_p:hours\">Takes an [ int ] of values and disallows the user to select only from those hours.</param>\r\n            ///</signature>\r\n            if (arguments.length === 0) {\r\n                return (options.disabledHours ? $.extend({}, options.disabledHours) : options.disabledHours);\r\n            }\r\n\r\n            if (!hours) {\r\n                options.disabledHours = false;\r\n                update();\r\n                return picker;\r\n            }\r\n            if (!(hours instanceof Array)) {\r\n                throw new TypeError('disabledHours() expects an array parameter');\r\n            }\r\n            options.disabledHours = indexGivenHours(hours);\r\n            options.enabledHours = false;\r\n            if (options.useCurrent && !options.keepInvalid) {\r\n                var tries = 0;\r\n                while (!isValid(date, 'h')) {\r\n                    date.add(1, 'h');\r\n                    if (tries === 24) {\r\n                        throw 'Tried 24 times to find a valid date';\r\n                    }\r\n                    tries++;\r\n                }\r\n                setValue(date);\r\n            }\r\n            update();\r\n            return picker;\r\n        };\r\n\r\n        picker.enabledHours = function (hours) {\r\n            ///<signature helpKeyword=\"$.fn.datetimepicker.enabledHours\">\r\n            ///<summary>Returns an array with the currently set enabled hours on the component.</summary>\r\n            ///<returns type=\"array\">options.enabledHours</returns>\r\n            ///</signature>\r\n            ///<signature>\r\n            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledHours if such exist.</summary>\r\n            ///<param name=\"hours\" locid=\"$.fn.datetimepicker.enabledHours_p:hours\">Takes an [ int ] of values and allows the user to select only from those hours.</param>\r\n            ///</signature>\r\n            if (arguments.length === 0) {\r\n                return (options.enabledHours ? $.extend({}, options.enabledHours) : options.enabledHours);\r\n            }\r\n\r\n            if (!hours) {\r\n                options.enabledHours = false;\r\n                update();\r\n                return picker;\r\n            }\r\n            if (!(hours instanceof Array)) {\r\n                throw new TypeError('enabledHours() expects an array parameter');\r\n            }\r\n            options.enabledHours = indexGivenHours(hours);\r\n            options.disabledHours = false;\r\n            if (options.useCurrent && !options.keepInvalid) {\r\n                var tries = 0;\r\n                while (!isValid(date, 'h')) {\r\n                    date.add(1, 'h');\r\n                    if (tries === 24) {\r\n                        throw 'Tried 24 times to find a valid date';\r\n                    }\r\n                    tries++;\r\n                }\r\n                setValue(date);\r\n            }\r\n            update();\r\n            return picker;\r\n        };\r\n        /**\r\n         * Returns the component's model current viewDate, a moment object or null if not set. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.\r\n         * @param {Takes string, viewDate, moment, null parameter.} newDate\r\n         * @returns {viewDate.clone()}\r\n         */\r\n        picker.viewDate = function (newDate) {\r\n            if (arguments.length === 0) {\r\n                return viewDate.clone();\r\n            }\r\n\r\n            if (!newDate) {\r\n                viewDate = date.clone();\r\n                return picker;\r\n            }\r\n\r\n            if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {\r\n                throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');\r\n            }\r\n\r\n            viewDate = parseInputDate(newDate);\r\n            viewUpdate();\r\n            return picker;\r\n        };\r\n\r\n        // initializing element and component attributes\r\n        if (element.is('input')) {\r\n            input = element;\r\n        } else {\r\n            input = element.find(options.datepickerInput);\r\n            if (input.length === 0) {\r\n                input = element.find('input');\r\n            } else if (!input.is('input')) {\r\n                throw new Error('CSS class \"' + options.datepickerInput + '\" cannot be applied to non input element');\r\n            }\r\n        }\r\n\r\n        if (element.hasClass('input-group')) {\r\n            // in case there is more then one 'input-group-addon' Issue #48\r\n            if (element.find('.datepickerbutton').length === 0) {\r\n                component = element.find('.input-group-addon');\r\n            } else {\r\n                component = element.find('.datepickerbutton');\r\n            }\r\n        }\r\n\r\n        if (!options.inline && !input.is('input')) {\r\n            throw new Error('Could not initialize DateTimePicker without an input element');\r\n        }\r\n\r\n        // Set defaults for date here now instead of in var declaration\r\n        date = getMoment();\r\n        viewDate = date.clone();\r\n\r\n        $.extend(true, options, dataToOptions());\r\n\r\n        picker.options(options);\r\n\r\n        initFormatting();\r\n\r\n        attachDatePickerElementEvents();\r\n\r\n        if (input.prop('disabled')) {\r\n            picker.disable();\r\n        }\r\n        if (input.is('input') && input.val().trim().length !== 0) {\r\n            setValue(parseInputDate(input.val().trim()));\r\n        }\r\n        else if (options.defaultDate && input.attr('placeholder') === undefined) {\r\n            setValue(options.defaultDate);\r\n        }\r\n        if (options.inline) {\r\n            show();\r\n        }\r\n        return picker;\r\n    };\r\n\r\n    /********************************************************************************\r\n     *\r\n     * jQuery plugin constructor and defaults object\r\n     *\r\n     ********************************************************************************/\r\n\r\n    /**\r\n    * See (http://jquery.com/).\r\n    * @name jQuery\r\n    * @class\r\n    * See the jQuery Library  (http://jquery.com/) for full details.  This just\r\n    * documents the function and classes that are added to jQuery by this plug-in.\r\n    */\r\n    /**\r\n     * See (http://jquery.com/)\r\n     * @name fn\r\n     * @class\r\n     * See the jQuery Library  (http://jquery.com/) for full details.  This just\r\n     * documents the function and classes that are added to jQuery by this plug-in.\r\n     * @memberOf jQuery\r\n     */\r\n    /**\r\n     * Show comments\r\n     * @class datetimepicker\r\n     * @memberOf jQuery.fn\r\n     */\r\n    $.fn.datetimepicker = function (options) {\r\n        options = options || {};\r\n\r\n        var args = Array.prototype.slice.call(arguments, 1),\r\n            isInstance = true,\r\n            thisMethods = ['destroy', 'hide', 'show', 'toggle'],\r\n            returnValue;\r\n\r\n        if (typeof options === 'object') {\r\n            return this.each(function () {\r\n                var $this = $(this);\r\n                if (!$this.data('DateTimePicker')) {\r\n                    // create a private copy of the defaults object\r\n                    options = $.extend(true, {}, $.fn.datetimepicker.defaults, options);\r\n                    $this.data('DateTimePicker', dateTimePicker($this, options));\r\n                }\r\n            });\r\n        } else if (typeof options === 'string') {\r\n            this.each(function () {\r\n                var $this = $(this),\r\n                    instance = $this.data('DateTimePicker');\r\n                if (!instance) {\r\n                    throw new Error('bootstrap-datetimepicker(\"' + options + '\") method was called on an element that is not using DateTimePicker');\r\n                }\r\n\r\n                returnValue = instance[options].apply(instance, args);\r\n                isInstance = returnValue === instance;\r\n            });\r\n\r\n            if (isInstance || $.inArray(options, thisMethods) > -1) {\r\n                return this;\r\n            }\r\n\r\n            return returnValue;\r\n        }\r\n\r\n        throw new TypeError('Invalid arguments for DateTimePicker: ' + options);\r\n    };\r\n\r\n    $.fn.datetimepicker.defaults = {\r\n        timeZone: '',\r\n        format: false,\r\n        dayViewHeaderFormat: 'MMMM YYYY',\r\n        extraFormats: false,\r\n        stepping: 1,\r\n        minDate: false,\r\n        maxDate: false,\r\n        useCurrent: true,\r\n        collapse: true,\r\n        locale: moment.locale(),\r\n        defaultDate: false,\r\n        disabledDates: false,\r\n        enabledDates: false,\r\n        icons: {\r\n            time: 'glyphicon glyphicon-time',\r\n            date: 'glyphicon glyphicon-calendar',\r\n            up: 'glyphicon glyphicon-chevron-up',\r\n            down: 'glyphicon glyphicon-chevron-down',\r\n            previous: 'glyphicon glyphicon-chevron-left',\r\n            next: 'glyphicon glyphicon-chevron-right',\r\n            today: 'glyphicon glyphicon-screenshot',\r\n            clear: 'glyphicon glyphicon-trash',\r\n            close: 'glyphicon glyphicon-remove'\r\n        },\r\n        tooltips: {\r\n            today: 'Go to today',\r\n            clear: 'Clear selection',\r\n            close: 'Close the picker',\r\n            selectMonth: 'Select Month',\r\n            prevMonth: 'Previous Month',\r\n            nextMonth: 'Next Month',\r\n            selectYear: 'Select Year',\r\n            prevYear: 'Previous Year',\r\n            nextYear: 'Next Year',\r\n            selectDecade: 'Select Decade',\r\n            prevDecade: 'Previous Decade',\r\n            nextDecade: 'Next Decade',\r\n            prevCentury: 'Previous Century',\r\n            nextCentury: 'Next Century',\r\n            pickHour: 'Pick Hour',\r\n            incrementHour: 'Increment Hour',\r\n            decrementHour: 'Decrement Hour',\r\n            pickMinute: 'Pick Minute',\r\n            incrementMinute: 'Increment Minute',\r\n            decrementMinute: 'Decrement Minute',\r\n            pickSecond: 'Pick Second',\r\n            incrementSecond: 'Increment Second',\r\n            decrementSecond: 'Decrement Second',\r\n            togglePeriod: 'Toggle Period',\r\n            selectTime: 'Select Time'\r\n        },\r\n        useStrict: false,\r\n        sideBySide: false,\r\n        daysOfWeekDisabled: false,\r\n        calendarWeeks: false,\r\n        viewMode: 'days',\r\n        toolbarPlacement: 'default',\r\n        showTodayButton: false,\r\n        showClear: false,\r\n        showClose: false,\r\n        widgetPositioning: {\r\n            horizontal: 'auto',\r\n            vertical: 'auto'\r\n        },\r\n        widgetParent: null,\r\n        ignoreReadonly: false,\r\n        keepOpen: false,\r\n        focusOnShow: true,\r\n        inline: false,\r\n        keepInvalid: false,\r\n        datepickerInput: '.datepickerinput',\r\n        keyBinds: {\r\n            up: function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().subtract(7, 'd'));\r\n                } else {\r\n                    this.date(d.clone().add(this.stepping(), 'm'));\r\n                }\r\n            },\r\n            down: function (widget) {\r\n                if (!widget) {\r\n                    this.show();\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().add(7, 'd'));\r\n                } else {\r\n                    this.date(d.clone().subtract(this.stepping(), 'm'));\r\n                }\r\n            },\r\n            'control up': function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().subtract(1, 'y'));\r\n                } else {\r\n                    this.date(d.clone().add(1, 'h'));\r\n                }\r\n            },\r\n            'control down': function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().add(1, 'y'));\r\n                } else {\r\n                    this.date(d.clone().subtract(1, 'h'));\r\n                }\r\n            },\r\n            left: function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().subtract(1, 'd'));\r\n                }\r\n            },\r\n            right: function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().add(1, 'd'));\r\n                }\r\n            },\r\n            pageUp: function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().subtract(1, 'M'));\r\n                }\r\n            },\r\n            pageDown: function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                var d = this.date() || this.getMoment();\r\n                if (widget.find('.datepicker').is(':visible')) {\r\n                    this.date(d.clone().add(1, 'M'));\r\n                }\r\n            },\r\n            enter: function () {\r\n                this.hide();\r\n            },\r\n            escape: function () {\r\n                this.hide();\r\n            },\r\n            //tab: function (widget) { //this break the flow of the form. disabling for now\r\n            //    var toggle = widget.find('.picker-switch a[data-action=\"togglePicker\"]');\r\n            //    if(toggle.length > 0) toggle.click();\r\n            //},\r\n            'control space': function (widget) {\r\n                if (!widget) {\r\n                    return;\r\n                }\r\n                if (widget.find('.timepicker').is(':visible')) {\r\n                    widget.find('.btn[data-action=\"togglePeriod\"]').click();\r\n                }\r\n            },\r\n            t: function () {\r\n                this.date(this.getMoment());\r\n            },\r\n            'delete': function () {\r\n                this.clear();\r\n            }\r\n        },\r\n        debug: false,\r\n        allowInputToggle: false,\r\n        disabledTimeIntervals: false,\r\n        disabledHours: false,\r\n        enabledHours: false,\r\n        viewDate: false\r\n    };\r\n    if (typeof module !== 'undefined') {\r\n        module.exports = $.fn.datetimepicker;\r\n    }\r\n}));\r\n"

/***/ },

/***/ 737:
/***/ function(module, exports) {

module.exports = "/*!\n * jQuery JavaScript Library v2.2.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:23Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar arr = [];\n\nvar document = window.document;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"2.2.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray,\n\n\tisWindow: function( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Not plain objects:\n\t\t// - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n\t\t// - DOM nodes\n\t\t// - window\n\t\tif ( jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Not own constructor property must be Object\n\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype || {}, \"isPrototypeOf\" ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\n\t\t// Support: Android<4.0, iOS<6 (functionish RegExp)\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tvar script,\n\t\t\tindirect = eval;\n\n\t\tcode = jQuery.trim( code );\n\n\t\tif ( code ) {\n\n\t\t\t// If the code includes a valid, prologue position\n\t\t\t// strict mode pragma, execute code by injecting a\n\t\t\t// script tag into the document.\n\t\t\tif ( code.indexOf( \"use strict\" ) === 1 ) {\n\t\t\t\tscript = document.createElement( \"script\" );\n\t\t\t\tscript.text = code;\n\t\t\t\tdocument.head.appendChild( script ).parentNode.removeChild( script );\n\t\t\t} else {\n\n\t\t\t\t// Otherwise, avoid the DOM node creation, insertion\n\t\t\t\t// and removal by using an indirect global eval\n\n\t\t\t\tindirect( code );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Support: IE9-11+\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar tmp, args, proxy;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: Date.now,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tlen = this.length,\n\t\t\tret = [],\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Support: Blackberry 4.6\n\t\t\t\t\t// gEBID returns nodes no longer in the document (#6963)\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn elem.contentDocument || jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// Add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE9-10 only\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t} else {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlen ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\t/* jshint -W018 */\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tregister: function( owner, initial ) {\n\t\tvar value = initial || {};\n\n\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t// use plain assignment\n\t\tif ( owner.nodeType ) {\n\t\t\towner[ this.expando ] = value;\n\n\t\t// Otherwise secure it in a non-enumerable, non-writable property\n\t\t// configurability must be true to allow the property to be\n\t\t// deleted with the delete operator\n\t\t} else {\n\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\tvalue: value,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t} );\n\t\t}\n\t\treturn owner[ this.expando ];\n\t},\n\tcache: function( owner ) {\n\n\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t// but we should not, see #8335.\n\t\t// Always return an empty object.\n\t\tif ( !acceptData( owner ) ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ data ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ prop ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\t\t\towner[ this.expando ] && owner[ this.expando ][ key ];\n\t},\n\taccess: function( owner, key, value ) {\n\t\tvar stored;\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\tstored = this.get( owner, key );\n\n\t\t\treturn stored !== undefined ?\n\t\t\t\tstored : this.get( owner, jQuery.camelCase( key ) );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i, name, camel,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === undefined ) {\n\t\t\tthis.register( owner );\n\n\t\t} else {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( jQuery.isArray( key ) ) {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = key.concat( key.map( jQuery.camelCase ) );\n\t\t\t} else {\n\t\t\t\tcamel = jQuery.camelCase( key );\n\n\t\t\t\t// Try the string as a key before any manipulation\n\t\t\t\tif ( key in cache ) {\n\t\t\t\t\tname = [ key, camel ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\t\tname = camel;\n\t\t\t\t\tname = name in cache ?\n\t\t\t\t\t\t[ name ] : ( name.match( rnotwhite ) || [] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ti = name.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ name[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <= 35-45+\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data, camelKey;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key as-is\n\t\t\t\tdata = dataUser.get( elem, key ) ||\n\n\t\t\t\t\t// Try to find dashed key if it exists (gh-2779)\n\t\t\t\t\t// This is for 2.2.x only\n\t\t\t\t\tdataUser.get( elem, key.replace( rmultiDash, \"-$&\" ).toLowerCase() );\n\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\tcamelKey = jQuery.camelCase( key );\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key camelized\n\t\t\t\tdata = dataUser.get( elem, camelKey );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, camelKey, undefined );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tcamelKey = jQuery.camelCase( key );\n\t\t\tthis.each( function() {\n\n\t\t\t\t// First, attempt to store a copy or reference of any\n\t\t\t\t// data that might've been store with a camelCased key.\n\t\t\t\tvar data = dataUser.get( this, camelKey );\n\n\t\t\t\t// For HTML5 data-* attribute interop, we have to\n\t\t\t\t// store property names with dashes in a camelCase form.\n\t\t\t\t// This might not apply to all properties...*\n\t\t\t\tdataUser.set( this, camelKey, value );\n\n\t\t\t\t// *... In the case of properties that might _actually_\n\t\t\t\t// have dashes, we need to also store a copy of that\n\t\t\t\t// unchanged property.\n\t\t\t\tif ( key.indexOf( \"-\" ) > -1 && data !== undefined ) {\n\t\t\t\t\tdataUser.set( this, key, value );\n\t\t\t\t}\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE9\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\n// Support: IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE9-11+\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t[];\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], ret ) :\n\t\tret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, contains, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0-4.3, Safari<=5.1\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari<=5.1, Android<4.2\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<=11+\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( dataPriv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY offsetX offsetY pageX pageY \" +\n\t\t\t\"screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar eventDoc, doc, body,\n\t\t\t\tbutton = original.button;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop  || body && body.clientTop  || 0 );\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: Cordova 2.5 (WebKit) (#13255)\n\t\t// All events should have a target; Cordova deviceready doesn't\n\t\tif ( !event.target ) {\n\t\t\tevent.target = document;\n\t\t}\n\n\t\t// Support: Safari 6.0+, Chrome<28\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\tthis.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this.type === \"checkbox\" && this.click && jQuery.nodeName( this, \"input\" ) ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android<4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.access( src );\n\t\tpdataCur = dataPriv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval( node.textContent.replace( rcleanScript, \"\" ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <= 35-45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <= 35-45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: QtWebKit\n\t\t\t// .get() because push.apply(_, arraylike) throws\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: \"block\",\n\t\tBODY: \"block\"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( \"<iframe frameborder='0' width='0' height='0'/>\" ) )\n\t\t\t\t.appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = iframe[ 0 ].contentDocument;\n\n\t\t\t// Support: IE\n\t\t\tdoc.write();\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\nvar rmargin = ( /^margin/ );\n\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar documentElement = document.documentElement;\n\n\n\n( function() {\n\tvar pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE9-11+\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tcontainer.style.cssText = \"border:0;width:8px;height:0;top:0;left:-9999px;\" +\n\t\t\"padding:0;margin-top:1px;position:absolute\";\n\tcontainer.appendChild( div );\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\t}\n\n\tjQuery.extend( support, {\n\t\tpixelPosition: function() {\n\n\t\t\t// This test is executed only once but we still do memoizing\n\t\t\t// since we can use the boxSizingReliable pre-computing.\n\t\t\t// No need to check if the test was already performed, though.\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\tboxSizingReliable: function() {\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelMarginRight: function() {\n\n\t\t\t// Support: Android 4.0-4.3\n\t\t\t// We're checking for boxSizingReliableVal here instead of pixelMarginRightVal\n\t\t\t// since that compresses better and they're computed together anyway.\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\n\t\t\t// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37\n\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\treliableMarginRight: function() {\n\n\t\t\t// Support: Android 2.3\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container. (#3333)\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t// This support function is only executed once so no memoizing is needed.\n\t\t\tvar ret,\n\t\t\t\tmarginDiv = div.appendChild( document.createElement( \"div\" ) );\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\n\t\t\tmarginDiv.style.cssText = div.style.cssText =\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;box-sizing:content-box;\" +\n\t\t\t\t\"display:block;margin:0;border:0;padding:0\";\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\n\t\t\tdiv.style.width = \"1px\";\n\t\t\tdocumentElement.appendChild( container );\n\n\t\t\tret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );\n\n\t\t\tdocumentElement.removeChild( container );\n\t\t\tdiv.removeChild( marginDiv );\n\n\t\t\treturn ret;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;\n\n\t// Support: Opera 12.1x only\n\t// Fall back to style even without computed\n\t// computed is undefined for elems on document fragments\n\tif ( ( ret === \"\" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\tret = jQuery.style( elem, name );\n\t}\n\n\t// Support: IE9\n\t// getPropertyValue is only needed for .css('filter') (#12537)\n\tif ( computed ) {\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// http://dev.w3.org/csswg/cssom/#resolved-values\n\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE9-11+\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style;\n\n// Return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// At this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// At this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// At this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// Some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test( val ) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// Use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = dataPriv.get( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] = dataPriv.access(\n\t\t\t\t\telem,\n\t\t\t\t\t\"olddisplay\",\n\t\t\t\t\tdefaultDisplay( elem.nodeName )\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\thidden = isHidden( elem );\n\n\t\t\tif ( display !== \"none\" || !hidden ) {\n\t\t\t\tdataPriv.set(\n\t\t\t\t\telem,\n\t\t\t\t\t\"olddisplay\",\n\t\t\t\t\thidden ? display : jQuery.css( elem, \"display\" )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t\"float\": \"cssFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === \"number\" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tstyle[ name ] = value;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\t\t\t\t\telem.offsetWidth === 0 ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = extra && getStyles( elem ),\n\t\t\t\tsubtract = extra && augmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t);\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ name ] = value;\n\t\t\t\tvalue = jQuery.css( elem, name );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// Support: Android 2.3\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE9\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE9-10 do not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\n\t\t// Test default display if display is currently \"none\"\n\t\tcheckDisplay = display === \"none\" ?\n\t\t\tdataPriv.get( elem, \"olddisplay\" ) || defaultDisplay( elem.nodeName ) : display;\n\n\t\tif ( checkDisplay === \"inline\" && jQuery.css( elem, \"float\" ) === \"none\" ) {\n\t\t\tstyle.display = \"inline-block\";\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// If there is dataShow left over from a stopped hide or show\n\t\t\t\t// and we are going to proceed with show, we should pretend to be hidden\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\n\t\t// Any non-fx value stops us from restoring the original display value\n\t\t} else {\n\t\t\tdisplay = undefined;\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// Store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done( function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t} );\n\t\t}\n\t\tanim.done( function() {\n\t\t\tvar prop;\n\n\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t} );\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\n\t} else if ( ( display === \"none\" ? defaultDisplay( elem.nodeName ) : display ) === \"inline\" ) {\n\t\tstyle.display = display;\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tjQuery.proxy( result.stop, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnotwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ?\n\t\topt.duration : opt.duration in jQuery.fx.speeds ?\n\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\twindow.clearInterval( timerId );\n\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: iOS<=5.1, Android<=4.2+\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE<=11+\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: Android<=2.3\n\t// Options inside disabled selects are incorrectly marked as disabled\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE<=11+\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle;\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ name ];\n\t\t\tattrHandle[ name ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tname.toLowerCase() :\n\t\t\t\tnull;\n\t\t\tattrHandle[ name ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( type === \"string\" ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + getClass( elem ) + \" \" ).replace( rclass, \" \" )\n\t\t\t\t\t.indexOf( className ) > -1\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g,\n\trspaces = /[\\x20\\t\\r\\n\\f]+/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\n\t\t\t\t\t// Handle most common string cases\n\t\t\t\t\tret.replace( rreturn, \"\" ) :\n\n\t\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE10-11+\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) ).replace( rspaces, \" \" );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( support.optDisabled ?\n\t\t\t\t\t\t\t\t!option.disabled : option.getAttribute( \"disabled\" ) === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\telem[ type ]();\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\njQuery.each( ( \"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\" ).split( \" \" ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\n// Support: Firefox\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = jQuery.now();\n\nvar rquery = ( /\\?/ );\n\n\n\n// Support: Android 2.3\n// Workaround failure to string-cast null input\njQuery.parseJSON = function( data ) {\n\treturn JSON.parse( data + \"\" );\n};\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE9\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" ).replace( rhash, \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE8-11+\n\t\t\t// IE throws exception if url is malformed, e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE8-11+\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapAll( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( this[ 0 ] ) {\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each( function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t} ).end();\n\t}\n} );\n\n\njQuery.expr.filters.hidden = function( elem ) {\n\treturn !jQuery.expr.filters.visible( elem );\n};\njQuery.expr.filters.visible = function( elem ) {\n\n\t// Support: Opera <= 12.12\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\t// Use OR instead of AND as the element is not visible if either is true\n\t// See tickets #10406 and #13132\n\treturn elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;\n};\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t} ) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE9\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE9\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = callback( \"error\" );\n\n\t\t\t\t// Support: IE9\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" ).prop( {\n\t\t\t\t\tcharset: s.scriptCharset,\n\t\t\t\t\tsrc: s.url\n\t\t\t\t} ).on(\n\t\t\t\t\t\"load error\",\n\t\t\t\t\tcallback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\tcontext = context || document;\n\n\tvar parsed = rsingleTag.exec( data ),\n\t\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n// Keep a copy of the old load method\nvar _load = jQuery.fn.load;\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = jQuery.trim( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.filters.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\toffset: function( options ) {\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar docElem, win,\n\t\t\telem = this[ 0 ],\n\t\t\tbox = { top: 0, left: 0 },\n\t\t\tdoc = elem && elem.ownerDocument;\n\n\t\tif ( !doc ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure it's not a disconnected DOM node\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box;\n\t\t}\n\n\t\tbox = elem.getBoundingClientRect();\n\t\twin = getWindow( doc );\n\t\treturn {\n\t\t\ttop: box.top + win.pageYOffset - docElem.clientTop,\n\t\t\tleft: box.left + win.pageXOffset - docElem.clientLeft\n\t\t};\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n\t\t// because it is its only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume getBoundingClientRect is there when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari<7-8+, Chrome<37-44+\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\t\tfunction( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t} );\n} );\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\tsize: function() {\n\t\treturn this.length;\n\t}\n} );\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( !noGlobal ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\nreturn jQuery;\n}));\n"

/***/ },

/***/ 738:
/***/ function(module, exports) {

module.exports = ";(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, (function () { 'use strict';\n\nvar hookCallback;\n\nfunction hooks () {\n    return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback (callback) {\n    hookCallback = callback;\n}\n\nfunction isArray(input) {\n    return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n}\n\nfunction isObject(input) {\n    // IE8 will treat undefined and null as object if it wasn't for\n    // input != null\n    return input != null && Object.prototype.toString.call(input) === '[object Object]';\n}\n\nfunction isObjectEmpty(obj) {\n    var k;\n    for (k in obj) {\n        // even if its not own property I'd still call it non-empty\n        return false;\n    }\n    return true;\n}\n\nfunction isNumber(input) {\n    return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n}\n\nfunction isDate(input) {\n    return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n}\n\nfunction map(arr, fn) {\n    var res = [], i;\n    for (i = 0; i < arr.length; ++i) {\n        res.push(fn(arr[i], i));\n    }\n    return res;\n}\n\nfunction hasOwnProp(a, b) {\n    return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction extend(a, b) {\n    for (var i in b) {\n        if (hasOwnProp(b, i)) {\n            a[i] = b[i];\n        }\n    }\n\n    if (hasOwnProp(b, 'toString')) {\n        a.toString = b.toString;\n    }\n\n    if (hasOwnProp(b, 'valueOf')) {\n        a.valueOf = b.valueOf;\n    }\n\n    return a;\n}\n\nfunction createUTC (input, format, locale, strict) {\n    return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n    // We need to deep clone this object.\n    return {\n        empty           : false,\n        unusedTokens    : [],\n        unusedInput     : [],\n        overflow        : -2,\n        charsLeftOver   : 0,\n        nullInput       : false,\n        invalidMonth    : null,\n        invalidFormat   : false,\n        userInvalidated : false,\n        iso             : false,\n        parsedDateParts : [],\n        meridiem        : null\n    };\n}\n\nfunction getParsingFlags(m) {\n    if (m._pf == null) {\n        m._pf = defaultParsingFlags();\n    }\n    return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n    some = Array.prototype.some;\n} else {\n    some = function (fun) {\n        var t = Object(this);\n        var len = t.length >>> 0;\n\n        for (var i = 0; i < len; i++) {\n            if (i in t && fun.call(this, t[i], i, t)) {\n                return true;\n            }\n        }\n\n        return false;\n    };\n}\n\nvar some$1 = some;\n\nfunction isValid(m) {\n    if (m._isValid == null) {\n        var flags = getParsingFlags(m);\n        var parsedParts = some$1.call(flags.parsedDateParts, function (i) {\n            return i != null;\n        });\n        var isNowValid = !isNaN(m._d.getTime()) &&\n            flags.overflow < 0 &&\n            !flags.empty &&\n            !flags.invalidMonth &&\n            !flags.invalidWeekday &&\n            !flags.nullInput &&\n            !flags.invalidFormat &&\n            !flags.userInvalidated &&\n            (!flags.meridiem || (flags.meridiem && parsedParts));\n\n        if (m._strict) {\n            isNowValid = isNowValid &&\n                flags.charsLeftOver === 0 &&\n                flags.unusedTokens.length === 0 &&\n                flags.bigHour === undefined;\n        }\n\n        if (Object.isFrozen == null || !Object.isFrozen(m)) {\n            m._isValid = isNowValid;\n        }\n        else {\n            return isNowValid;\n        }\n    }\n    return m._isValid;\n}\n\nfunction createInvalid (flags) {\n    var m = createUTC(NaN);\n    if (flags != null) {\n        extend(getParsingFlags(m), flags);\n    }\n    else {\n        getParsingFlags(m).userInvalidated = true;\n    }\n\n    return m;\n}\n\nfunction isUndefined(input) {\n    return input === void 0;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = hooks.momentProperties = [];\n\nfunction copyConfig(to, from) {\n    var i, prop, val;\n\n    if (!isUndefined(from._isAMomentObject)) {\n        to._isAMomentObject = from._isAMomentObject;\n    }\n    if (!isUndefined(from._i)) {\n        to._i = from._i;\n    }\n    if (!isUndefined(from._f)) {\n        to._f = from._f;\n    }\n    if (!isUndefined(from._l)) {\n        to._l = from._l;\n    }\n    if (!isUndefined(from._strict)) {\n        to._strict = from._strict;\n    }\n    if (!isUndefined(from._tzm)) {\n        to._tzm = from._tzm;\n    }\n    if (!isUndefined(from._isUTC)) {\n        to._isUTC = from._isUTC;\n    }\n    if (!isUndefined(from._offset)) {\n        to._offset = from._offset;\n    }\n    if (!isUndefined(from._pf)) {\n        to._pf = getParsingFlags(from);\n    }\n    if (!isUndefined(from._locale)) {\n        to._locale = from._locale;\n    }\n\n    if (momentProperties.length > 0) {\n        for (i in momentProperties) {\n            prop = momentProperties[i];\n            val = from[prop];\n            if (!isUndefined(val)) {\n                to[prop] = val;\n            }\n        }\n    }\n\n    return to;\n}\n\nvar updateInProgress = false;\n\n// Moment prototype object\nfunction Moment(config) {\n    copyConfig(this, config);\n    this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n    if (!this.isValid()) {\n        this._d = new Date(NaN);\n    }\n    // Prevent infinite loop in case updateOffset creates new moment\n    // objects.\n    if (updateInProgress === false) {\n        updateInProgress = true;\n        hooks.updateOffset(this);\n        updateInProgress = false;\n    }\n}\n\nfunction isMoment (obj) {\n    return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n}\n\nfunction absFloor (number) {\n    if (number < 0) {\n        // -0 -> 0\n        return Math.ceil(number) || 0;\n    } else {\n        return Math.floor(number);\n    }\n}\n\nfunction toInt(argumentForCoercion) {\n    var coercedNumber = +argumentForCoercion,\n        value = 0;\n\n    if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n        value = absFloor(coercedNumber);\n    }\n\n    return value;\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n    var len = Math.min(array1.length, array2.length),\n        lengthDiff = Math.abs(array1.length - array2.length),\n        diffs = 0,\n        i;\n    for (i = 0; i < len; i++) {\n        if ((dontConvert && array1[i] !== array2[i]) ||\n            (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n            diffs++;\n        }\n    }\n    return diffs + lengthDiff;\n}\n\nfunction warn(msg) {\n    if (hooks.suppressDeprecationWarnings === false &&\n            (typeof console !==  'undefined') && console.warn) {\n        console.warn('Deprecation warning: ' + msg);\n    }\n}\n\nfunction deprecate(msg, fn) {\n    var firstTime = true;\n\n    return extend(function () {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(null, msg);\n        }\n        if (firstTime) {\n            var args = [];\n            var arg;\n            for (var i = 0; i < arguments.length; i++) {\n                arg = '';\n                if (typeof arguments[i] === 'object') {\n                    arg += '\\n[' + i + '] ';\n                    for (var key in arguments[0]) {\n                        arg += key + ': ' + arguments[0][key] + ', ';\n                    }\n                    arg = arg.slice(0, -2); // Remove trailing comma and space\n                } else {\n                    arg = arguments[i];\n                }\n                args.push(arg);\n            }\n            warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n            firstTime = false;\n        }\n        return fn.apply(this, arguments);\n    }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n    if (hooks.deprecationHandler != null) {\n        hooks.deprecationHandler(name, msg);\n    }\n    if (!deprecations[name]) {\n        warn(msg);\n        deprecations[name] = true;\n    }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n    return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n}\n\nfunction set (config) {\n    var prop, i;\n    for (i in config) {\n        prop = config[i];\n        if (isFunction(prop)) {\n            this[i] = prop;\n        } else {\n            this['_' + i] = prop;\n        }\n    }\n    this._config = config;\n    // Lenient ordinal parsing accepts just a number in addition to\n    // number + (possibly) stuff coming from _ordinalParseLenient.\n    this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n    var res = extend({}, parentConfig), prop;\n    for (prop in childConfig) {\n        if (hasOwnProp(childConfig, prop)) {\n            if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                res[prop] = {};\n                extend(res[prop], parentConfig[prop]);\n                extend(res[prop], childConfig[prop]);\n            } else if (childConfig[prop] != null) {\n                res[prop] = childConfig[prop];\n            } else {\n                delete res[prop];\n            }\n        }\n    }\n    for (prop in parentConfig) {\n        if (hasOwnProp(parentConfig, prop) &&\n                !hasOwnProp(childConfig, prop) &&\n                isObject(parentConfig[prop])) {\n            // make sure changes to properties don't modify parent config\n            res[prop] = extend({}, res[prop]);\n        }\n    }\n    return res;\n}\n\nfunction Locale(config) {\n    if (config != null) {\n        this.set(config);\n    }\n}\n\nvar keys;\n\nif (Object.keys) {\n    keys = Object.keys;\n} else {\n    keys = function (obj) {\n        var i, res = [];\n        for (i in obj) {\n            if (hasOwnProp(obj, i)) {\n                res.push(i);\n            }\n        }\n        return res;\n    };\n}\n\nvar keys$1 = keys;\n\nvar defaultCalendar = {\n    sameDay : '[Today at] LT',\n    nextDay : '[Tomorrow at] LT',\n    nextWeek : 'dddd [at] LT',\n    lastDay : '[Yesterday at] LT',\n    lastWeek : '[Last] dddd [at] LT',\n    sameElse : 'L'\n};\n\nfunction calendar (key, mom, now) {\n    var output = this._calendar[key] || this._calendar['sameElse'];\n    return isFunction(output) ? output.call(mom, now) : output;\n}\n\nvar defaultLongDateFormat = {\n    LTS  : 'h:mm:ss A',\n    LT   : 'h:mm A',\n    L    : 'MM/DD/YYYY',\n    LL   : 'MMMM D, YYYY',\n    LLL  : 'MMMM D, YYYY h:mm A',\n    LLLL : 'dddd, MMMM D, YYYY h:mm A'\n};\n\nfunction longDateFormat (key) {\n    var format = this._longDateFormat[key],\n        formatUpper = this._longDateFormat[key.toUpperCase()];\n\n    if (format || !formatUpper) {\n        return format;\n    }\n\n    this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n        return val.slice(1);\n    });\n\n    return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate () {\n    return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d';\nvar defaultOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal (number) {\n    return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n    future : 'in %s',\n    past   : '%s ago',\n    s  : 'a few seconds',\n    m  : 'a minute',\n    mm : '%d minutes',\n    h  : 'an hour',\n    hh : '%d hours',\n    d  : 'a day',\n    dd : '%d days',\n    M  : 'a month',\n    MM : '%d months',\n    y  : 'a year',\n    yy : '%d years'\n};\n\nfunction relativeTime (number, withoutSuffix, string, isFuture) {\n    var output = this._relativeTime[string];\n    return (isFunction(output)) ?\n        output(number, withoutSuffix, string, isFuture) :\n        output.replace(/%d/i, number);\n}\n\nfunction pastFuture (diff, output) {\n    var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n    return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias (unit, shorthand) {\n    var lowerCase = unit.toLowerCase();\n    aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n    return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n    var normalizedInput = {},\n        normalizedProp,\n        prop;\n\n    for (prop in inputObject) {\n        if (hasOwnProp(inputObject, prop)) {\n            normalizedProp = normalizeUnits(prop);\n            if (normalizedProp) {\n                normalizedInput[normalizedProp] = inputObject[prop];\n            }\n        }\n    }\n\n    return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n    priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n    var units = [];\n    for (var u in unitsObj) {\n        units.push({unit: u, priority: priorities[u]});\n    }\n    units.sort(function (a, b) {\n        return a.priority - b.priority;\n    });\n    return units;\n}\n\nfunction makeGetSet (unit, keepTime) {\n    return function (value) {\n        if (value != null) {\n            set$1(this, unit, value);\n            hooks.updateOffset(this, keepTime);\n            return this;\n        } else {\n            return get(this, unit);\n        }\n    };\n}\n\nfunction get (mom, unit) {\n    return mom.isValid() ?\n        mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n}\n\nfunction set$1 (mom, unit, value) {\n    if (mom.isValid()) {\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n    }\n}\n\n// MOMENTS\n\nfunction stringGet (units) {\n    units = normalizeUnits(units);\n    if (isFunction(this[units])) {\n        return this[units]();\n    }\n    return this;\n}\n\n\nfunction stringSet (units, value) {\n    if (typeof units === 'object') {\n        units = normalizeObjectUnits(units);\n        var prioritized = getPrioritizedUnits(units);\n        for (var i = 0; i < prioritized.length; i++) {\n            this[prioritized[i].unit](units[prioritized[i].unit]);\n        }\n    } else {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units](value);\n        }\n    }\n    return this;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n    var absNumber = '' + Math.abs(number),\n        zerosToFill = targetLength - absNumber.length,\n        sign = number >= 0;\n    return (sign ? (forceSign ? '+' : '') : '-') +\n        Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n}\n\nvar formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\nvar localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\nvar formatFunctions = {};\n\nvar formatTokenFunctions = {};\n\n// token:    'M'\n// padded:   ['MM', 2]\n// ordinal:  'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken (token, padded, ordinal, callback) {\n    var func = callback;\n    if (typeof callback === 'string') {\n        func = function () {\n            return this[callback]();\n        };\n    }\n    if (token) {\n        formatTokenFunctions[token] = func;\n    }\n    if (padded) {\n        formatTokenFunctions[padded[0]] = function () {\n            return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n        };\n    }\n    if (ordinal) {\n        formatTokenFunctions[ordinal] = function () {\n            return this.localeData().ordinal(func.apply(this, arguments), token);\n        };\n    }\n}\n\nfunction removeFormattingTokens(input) {\n    if (input.match(/\\[[\\s\\S]/)) {\n        return input.replace(/^\\[|\\]$/g, '');\n    }\n    return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n    var array = format.match(formattingTokens), i, length;\n\n    for (i = 0, length = array.length; i < length; i++) {\n        if (formatTokenFunctions[array[i]]) {\n            array[i] = formatTokenFunctions[array[i]];\n        } else {\n            array[i] = removeFormattingTokens(array[i]);\n        }\n    }\n\n    return function (mom) {\n        var output = '', i;\n        for (i = 0; i < length; i++) {\n            output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\n        }\n        return output;\n    };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n    if (!m.isValid()) {\n        return m.localeData().invalidDate();\n    }\n\n    format = expandFormat(format, m.localeData());\n    formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n    return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n    var i = 5;\n\n    function replaceLongDateFormatTokens(input) {\n        return locale.longDateFormat(input) || input;\n    }\n\n    localFormattingTokens.lastIndex = 0;\n    while (i >= 0 && localFormattingTokens.test(format)) {\n        format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n        localFormattingTokens.lastIndex = 0;\n        i -= 1;\n    }\n\n    return format;\n}\n\nvar match1         = /\\d/;            //       0 - 9\nvar match2         = /\\d\\d/;          //      00 - 99\nvar match3         = /\\d{3}/;         //     000 - 999\nvar match4         = /\\d{4}/;         //    0000 - 9999\nvar match6         = /[+-]?\\d{6}/;    // -999999 - 999999\nvar match1to2      = /\\d\\d?/;         //       0 - 99\nvar match3to4      = /\\d\\d\\d\\d?/;     //     999 - 9999\nvar match5to6      = /\\d\\d\\d\\d\\d\\d?/; //   99999 - 999999\nvar match1to3      = /\\d{1,3}/;       //       0 - 999\nvar match1to4      = /\\d{1,4}/;       //       0 - 9999\nvar match1to6      = /[+-]?\\d{1,6}/;  // -999999 - 999999\n\nvar matchUnsigned  = /\\d+/;           //       0 - inf\nvar matchSigned    = /[+-]?\\d+/;      //    -inf - inf\n\nvar matchOffset    = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\nvar matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\nvar matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n// any word (or two) characters or numbers including two/three word month in arabic.\n// includes scottish gaelic two word and hyphenated months\nvar matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n\nvar regexes = {};\n\nfunction addRegexToken (token, regex, strictRegex) {\n    regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n        return (isStrict && strictRegex) ? strictRegex : regex;\n    };\n}\n\nfunction getParseRegexForToken (token, config) {\n    if (!hasOwnProp(regexes, token)) {\n        return new RegExp(unescapeFormat(token));\n    }\n\n    return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n    return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n        return p1 || p2 || p3 || p4;\n    }));\n}\n\nfunction regexEscape(s) {\n    return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken (token, callback) {\n    var i, func = callback;\n    if (typeof token === 'string') {\n        token = [token];\n    }\n    if (isNumber(callback)) {\n        func = function (input, array) {\n            array[callback] = toInt(input);\n        };\n    }\n    for (i = 0; i < token.length; i++) {\n        tokens[token[i]] = func;\n    }\n}\n\nfunction addWeekParseToken (token, callback) {\n    addParseToken(token, function (input, array, config, token) {\n        config._w = config._w || {};\n        callback(input, config._w, config, token);\n    });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n    if (input != null && hasOwnProp(tokens, token)) {\n        tokens[token](input, config._a, config, token);\n    }\n}\n\nvar YEAR = 0;\nvar MONTH = 1;\nvar DATE = 2;\nvar HOUR = 3;\nvar MINUTE = 4;\nvar SECOND = 5;\nvar MILLISECOND = 6;\nvar WEEK = 7;\nvar WEEKDAY = 8;\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n    indexOf = Array.prototype.indexOf;\n} else {\n    indexOf = function (o) {\n        // I know\n        var i;\n        for (i = 0; i < this.length; ++i) {\n            if (this[i] === o) {\n                return i;\n            }\n        }\n        return -1;\n    };\n}\n\nvar indexOf$1 = indexOf;\n\nfunction daysInMonth(year, month) {\n    return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n    return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n    return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n    return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M',    match1to2);\naddRegexToken('MM',   match1to2, match2);\naddRegexToken('MMM',  function (isStrict, locale) {\n    return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n    return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n    array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n    var month = config._locale.monthsParse(input, token, config._strict);\n    // if we didn't find a month name, mark the date as invalid.\n    if (month != null) {\n        array[MONTH] = month;\n    } else {\n        getParsingFlags(config).invalidMonth = input;\n    }\n});\n\n// LOCALES\n\nvar MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\nvar defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\nfunction localeMonths (m, format) {\n    if (!m) {\n        return this._months;\n    }\n    return isArray(this._months) ? this._months[m.month()] :\n        this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nvar defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\nfunction localeMonthsShort (m, format) {\n    if (!m) {\n        return this._monthsShort;\n    }\n    return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n        this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n    var i, ii, mom, llc = monthName.toLocaleLowerCase();\n    if (!this._monthsParse) {\n        // this is not used\n        this._monthsParse = [];\n        this._longMonthsParse = [];\n        this._shortMonthsParse = [];\n        for (i = 0; i < 12; ++i) {\n            mom = createUTC([2000, i]);\n            this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n            this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n        }\n    }\n\n    if (strict) {\n        if (format === 'MMM') {\n            ii = indexOf$1.call(this._shortMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf$1.call(this._longMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    } else {\n        if (format === 'MMM') {\n            ii = indexOf$1.call(this._shortMonthsParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._longMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf$1.call(this._longMonthsParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._shortMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    }\n}\n\nfunction localeMonthsParse (monthName, format, strict) {\n    var i, mom, regex;\n\n    if (this._monthsParseExact) {\n        return handleStrictParse.call(this, monthName, format, strict);\n    }\n\n    if (!this._monthsParse) {\n        this._monthsParse = [];\n        this._longMonthsParse = [];\n        this._shortMonthsParse = [];\n    }\n\n    // TODO: add sorting\n    // Sorting makes sure if one month (or abbr) is a prefix of another\n    // see sorting in computeMonthsParse\n    for (i = 0; i < 12; i++) {\n        // make the regex if we don't have it already\n        mom = createUTC([2000, i]);\n        if (strict && !this._longMonthsParse[i]) {\n            this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n            this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n        }\n        if (!strict && !this._monthsParse[i]) {\n            regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n            this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n        }\n        // test the regex\n        if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n            return i;\n        } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n            return i;\n        } else if (!strict && this._monthsParse[i].test(monthName)) {\n            return i;\n        }\n    }\n}\n\n// MOMENTS\n\nfunction setMonth (mom, value) {\n    var dayOfMonth;\n\n    if (!mom.isValid()) {\n        // No op\n        return mom;\n    }\n\n    if (typeof value === 'string') {\n        if (/^\\d+$/.test(value)) {\n            value = toInt(value);\n        } else {\n            value = mom.localeData().monthsParse(value);\n            // TODO: Another silent failure?\n            if (!isNumber(value)) {\n                return mom;\n            }\n        }\n    }\n\n    dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n    mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n    return mom;\n}\n\nfunction getSetMonth (value) {\n    if (value != null) {\n        setMonth(this, value);\n        hooks.updateOffset(this, true);\n        return this;\n    } else {\n        return get(this, 'Month');\n    }\n}\n\nfunction getDaysInMonth () {\n    return daysInMonth(this.year(), this.month());\n}\n\nvar defaultMonthsShortRegex = matchWord;\nfunction monthsShortRegex (isStrict) {\n    if (this._monthsParseExact) {\n        if (!hasOwnProp(this, '_monthsRegex')) {\n            computeMonthsParse.call(this);\n        }\n        if (isStrict) {\n            return this._monthsShortStrictRegex;\n        } else {\n            return this._monthsShortRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_monthsShortRegex')) {\n            this._monthsShortRegex = defaultMonthsShortRegex;\n        }\n        return this._monthsShortStrictRegex && isStrict ?\n            this._monthsShortStrictRegex : this._monthsShortRegex;\n    }\n}\n\nvar defaultMonthsRegex = matchWord;\nfunction monthsRegex (isStrict) {\n    if (this._monthsParseExact) {\n        if (!hasOwnProp(this, '_monthsRegex')) {\n            computeMonthsParse.call(this);\n        }\n        if (isStrict) {\n            return this._monthsStrictRegex;\n        } else {\n            return this._monthsRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_monthsRegex')) {\n            this._monthsRegex = defaultMonthsRegex;\n        }\n        return this._monthsStrictRegex && isStrict ?\n            this._monthsStrictRegex : this._monthsRegex;\n    }\n}\n\nfunction computeMonthsParse () {\n    function cmpLenRev(a, b) {\n        return b.length - a.length;\n    }\n\n    var shortPieces = [], longPieces = [], mixedPieces = [],\n        i, mom;\n    for (i = 0; i < 12; i++) {\n        // make the regex if we don't have it already\n        mom = createUTC([2000, i]);\n        shortPieces.push(this.monthsShort(mom, ''));\n        longPieces.push(this.months(mom, ''));\n        mixedPieces.push(this.months(mom, ''));\n        mixedPieces.push(this.monthsShort(mom, ''));\n    }\n    // Sorting makes sure if one month (or abbr) is a prefix of another it\n    // will match the longer piece.\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n    for (i = 0; i < 12; i++) {\n        shortPieces[i] = regexEscape(shortPieces[i]);\n        longPieces[i] = regexEscape(longPieces[i]);\n    }\n    for (i = 0; i < 24; i++) {\n        mixedPieces[i] = regexEscape(mixedPieces[i]);\n    }\n\n    this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._monthsShortRegex = this._monthsRegex;\n    this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n    this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n    var y = this.year();\n    return y <= 9999 ? '' + y : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n    return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY',   4],       0, 'year');\naddFormatToken(0, ['YYYYY',  5],       0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y',      matchSigned);\naddRegexToken('YY',     match1to2, match2);\naddRegexToken('YYYY',   match1to4, match4);\naddRegexToken('YYYYY',  match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n    array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n    array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n    array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n    return isLeapYear(year) ? 366 : 365;\n}\n\nfunction isLeapYear(year) {\n    return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n    return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear () {\n    return isLeapYear(this.year());\n}\n\nfunction createDate (y, m, d, h, M, s, ms) {\n    //can't just apply() to create a date:\n    //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\n    var date = new Date(y, m, d, h, M, s, ms);\n\n    //the date constructor remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n        date.setFullYear(y);\n    }\n    return date;\n}\n\nfunction createUTCDate (y) {\n    var date = new Date(Date.UTC.apply(null, arguments));\n\n    //the Date.UTC function remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n        date.setUTCFullYear(y);\n    }\n    return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n    var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n        fwd = 7 + dow - doy,\n        // first-week day local weekday -- which local weekday is fwd\n        fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n    return -fwdlw + fwd - 1;\n}\n\n//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n    var localWeekday = (7 + weekday - dow) % 7,\n        weekOffset = firstWeekOffset(year, dow, doy),\n        dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n        resYear, resDayOfYear;\n\n    if (dayOfYear <= 0) {\n        resYear = year - 1;\n        resDayOfYear = daysInYear(resYear) + dayOfYear;\n    } else if (dayOfYear > daysInYear(year)) {\n        resYear = year + 1;\n        resDayOfYear = dayOfYear - daysInYear(year);\n    } else {\n        resYear = year;\n        resDayOfYear = dayOfYear;\n    }\n\n    return {\n        year: resYear,\n        dayOfYear: resDayOfYear\n    };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n    var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n        week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n        resWeek, resYear;\n\n    if (week < 1) {\n        resYear = mom.year() - 1;\n        resWeek = week + weeksInYear(resYear, dow, doy);\n    } else if (week > weeksInYear(mom.year(), dow, doy)) {\n        resWeek = week - weeksInYear(mom.year(), dow, doy);\n        resYear = mom.year() + 1;\n    } else {\n        resYear = mom.year();\n        resWeek = week;\n    }\n\n    return {\n        week: resWeek,\n        year: resYear\n    };\n}\n\nfunction weeksInYear(year, dow, doy) {\n    var weekOffset = firstWeekOffset(year, dow, doy),\n        weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n    return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w',  match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W',  match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n    week[token.substr(0, 1)] = toInt(input);\n});\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek (mom) {\n    return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n    dow : 0, // Sunday is the first day of the week.\n    doy : 6  // The week that contains Jan 1st is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek () {\n    return this._week.dow;\n}\n\nfunction localeFirstDayOfYear () {\n    return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek (input) {\n    var week = this.localeData().week(this);\n    return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek (input) {\n    var week = weekOfYear(this, 1, 4).week;\n    return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n    return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n    return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n    return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d',    match1to2);\naddRegexToken('e',    match1to2);\naddRegexToken('E',    match1to2);\naddRegexToken('dd',   function (isStrict, locale) {\n    return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd',   function (isStrict, locale) {\n    return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd',   function (isStrict, locale) {\n    return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n    var weekday = config._locale.weekdaysParse(input, token, config._strict);\n    // if we didn't get a weekday name, mark the date as invalid\n    if (weekday != null) {\n        week.d = weekday;\n    } else {\n        getParsingFlags(config).invalidWeekday = input;\n    }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n    week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n    if (typeof input !== 'string') {\n        return input;\n    }\n\n    if (!isNaN(input)) {\n        return parseInt(input, 10);\n    }\n\n    input = locale.weekdaysParse(input);\n    if (typeof input === 'number') {\n        return input;\n    }\n\n    return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n    if (typeof input === 'string') {\n        return locale.weekdaysParse(input) % 7 || 7;\n    }\n    return isNaN(input) ? null : input;\n}\n\n// LOCALES\n\nvar defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\nfunction localeWeekdays (m, format) {\n    if (!m) {\n        return this._weekdays;\n    }\n    return isArray(this._weekdays) ? this._weekdays[m.day()] :\n        this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n}\n\nvar defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\nfunction localeWeekdaysShort (m) {\n    return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n}\n\nvar defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\nfunction localeWeekdaysMin (m) {\n    return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n    var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n    if (!this._weekdaysParse) {\n        this._weekdaysParse = [];\n        this._shortWeekdaysParse = [];\n        this._minWeekdaysParse = [];\n\n        for (i = 0; i < 7; ++i) {\n            mom = createUTC([2000, 1]).day(i);\n            this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n            this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n            this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n        }\n    }\n\n    if (strict) {\n        if (format === 'dddd') {\n            ii = indexOf$1.call(this._weekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else if (format === 'ddd') {\n            ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf$1.call(this._minWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    } else {\n        if (format === 'dddd') {\n            ii = indexOf$1.call(this._weekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._minWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else if (format === 'ddd') {\n            ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._weekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._minWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf$1.call(this._minWeekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._weekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    }\n}\n\nfunction localeWeekdaysParse (weekdayName, format, strict) {\n    var i, mom, regex;\n\n    if (this._weekdaysParseExact) {\n        return handleStrictParse$1.call(this, weekdayName, format, strict);\n    }\n\n    if (!this._weekdaysParse) {\n        this._weekdaysParse = [];\n        this._minWeekdaysParse = [];\n        this._shortWeekdaysParse = [];\n        this._fullWeekdaysParse = [];\n    }\n\n    for (i = 0; i < 7; i++) {\n        // make the regex if we don't have it already\n\n        mom = createUTC([2000, 1]).day(i);\n        if (strict && !this._fullWeekdaysParse[i]) {\n            this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n            this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n            this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n        }\n        if (!this._weekdaysParse[i]) {\n            regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n            this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n        }\n        // test the regex\n        if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n            return i;\n        } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n            return i;\n        } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n            return i;\n        } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n            return i;\n        }\n    }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek (input) {\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n    var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n    if (input != null) {\n        input = parseWeekday(input, this.localeData());\n        return this.add(input - day, 'd');\n    } else {\n        return day;\n    }\n}\n\nfunction getSetLocaleDayOfWeek (input) {\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n    var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n    return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek (input) {\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n\n    // behaves the same as moment#day except\n    // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n    // as a setter, sunday should belong to the previous week.\n\n    if (input != null) {\n        var weekday = parseIsoWeekday(input, this.localeData());\n        return this.day(this.day() % 7 ? weekday : weekday - 7);\n    } else {\n        return this.day() || 7;\n    }\n}\n\nvar defaultWeekdaysRegex = matchWord;\nfunction weekdaysRegex (isStrict) {\n    if (this._weekdaysParseExact) {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            computeWeekdaysParse.call(this);\n        }\n        if (isStrict) {\n            return this._weekdaysStrictRegex;\n        } else {\n            return this._weekdaysRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            this._weekdaysRegex = defaultWeekdaysRegex;\n        }\n        return this._weekdaysStrictRegex && isStrict ?\n            this._weekdaysStrictRegex : this._weekdaysRegex;\n    }\n}\n\nvar defaultWeekdaysShortRegex = matchWord;\nfunction weekdaysShortRegex (isStrict) {\n    if (this._weekdaysParseExact) {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            computeWeekdaysParse.call(this);\n        }\n        if (isStrict) {\n            return this._weekdaysShortStrictRegex;\n        } else {\n            return this._weekdaysShortRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n            this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n        }\n        return this._weekdaysShortStrictRegex && isStrict ?\n            this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n    }\n}\n\nvar defaultWeekdaysMinRegex = matchWord;\nfunction weekdaysMinRegex (isStrict) {\n    if (this._weekdaysParseExact) {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            computeWeekdaysParse.call(this);\n        }\n        if (isStrict) {\n            return this._weekdaysMinStrictRegex;\n        } else {\n            return this._weekdaysMinRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n            this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n        }\n        return this._weekdaysMinStrictRegex && isStrict ?\n            this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n    }\n}\n\n\nfunction computeWeekdaysParse () {\n    function cmpLenRev(a, b) {\n        return b.length - a.length;\n    }\n\n    var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n        i, mom, minp, shortp, longp;\n    for (i = 0; i < 7; i++) {\n        // make the regex if we don't have it already\n        mom = createUTC([2000, 1]).day(i);\n        minp = this.weekdaysMin(mom, '');\n        shortp = this.weekdaysShort(mom, '');\n        longp = this.weekdays(mom, '');\n        minPieces.push(minp);\n        shortPieces.push(shortp);\n        longPieces.push(longp);\n        mixedPieces.push(minp);\n        mixedPieces.push(shortp);\n        mixedPieces.push(longp);\n    }\n    // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n    // will match the longer piece.\n    minPieces.sort(cmpLenRev);\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n    for (i = 0; i < 7; i++) {\n        shortPieces[i] = regexEscape(shortPieces[i]);\n        longPieces[i] = regexEscape(longPieces[i]);\n        mixedPieces[i] = regexEscape(mixedPieces[i]);\n    }\n\n    this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._weekdaysShortRegex = this._weekdaysRegex;\n    this._weekdaysMinRegex = this._weekdaysRegex;\n\n    this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n    this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n    this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\nfunction hFormat() {\n    return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n    return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n    return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n    return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n        zeroFill(this.seconds(), 2);\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n    return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n    return '' + this.hours() + zeroFill(this.minutes(), 2) +\n        zeroFill(this.seconds(), 2);\n});\n\nfunction meridiem (token, lowercase) {\n    addFormatToken(token, 0, 0, function () {\n        return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n    });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem (isStrict, locale) {\n    return locale._meridiemParse;\n}\n\naddRegexToken('a',  matchMeridiem);\naddRegexToken('A',  matchMeridiem);\naddRegexToken('H',  match1to2);\naddRegexToken('h',  match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['a', 'A'], function (input, array, config) {\n    config._isPm = config._locale.isPM(input);\n    config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n    array[HOUR] = toInt(input);\n    getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n    var pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n    getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n    var pos1 = input.length - 4;\n    var pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n    getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n    var pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n    var pos1 = input.length - 4;\n    var pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM (input) {\n    // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n    // Using charAt should be more compatible.\n    return ((input + '').toLowerCase().charAt(0) === 'p');\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\nfunction localeMeridiem (hours, minutes, isLower) {\n    if (hours > 11) {\n        return isLower ? 'pm' : 'PM';\n    } else {\n        return isLower ? 'am' : 'AM';\n    }\n}\n\n\n// MOMENTS\n\n// Setting the hour should keep the time, because the user explicitly\n// specified which hour he wants. So trying to maintain the same hour (in\n// a new timezone) makes sense. Adding/subtracting hours does not follow\n// this rule.\nvar getSetHour = makeGetSet('Hours', true);\n\n// months\n// week\n// weekdays\n// meridiem\nvar baseConfig = {\n    calendar: defaultCalendar,\n    longDateFormat: defaultLongDateFormat,\n    invalidDate: defaultInvalidDate,\n    ordinal: defaultOrdinal,\n    ordinalParse: defaultOrdinalParse,\n    relativeTime: defaultRelativeTime,\n\n    months: defaultLocaleMonths,\n    monthsShort: defaultLocaleMonthsShort,\n\n    week: defaultLocaleWeek,\n\n    weekdays: defaultLocaleWeekdays,\n    weekdaysMin: defaultLocaleWeekdaysMin,\n    weekdaysShort: defaultLocaleWeekdaysShort,\n\n    meridiemParse: defaultLocaleMeridiemParse\n};\n\n// internal storage for locale config files\nvar locales = {};\nvar localeFamilies = {};\nvar globalLocale;\n\nfunction normalizeLocale(key) {\n    return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n    var i = 0, j, next, locale, split;\n\n    while (i < names.length) {\n        split = normalizeLocale(names[i]).split('-');\n        j = split.length;\n        next = normalizeLocale(names[i + 1]);\n        next = next ? next.split('-') : null;\n        while (j > 0) {\n            locale = loadLocale(split.slice(0, j).join('-'));\n            if (locale) {\n                return locale;\n            }\n            if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n                //the next array item is better than a shallower substring of this one\n                break;\n            }\n            j--;\n        }\n        i++;\n    }\n    return null;\n}\n\nfunction loadLocale(name) {\n    var oldLocale = null;\n    // TODO: Find a better way to register and load all the locales in Node\n    if (!locales[name] && (typeof module !== 'undefined') &&\n            module && module.exports) {\n        try {\n            oldLocale = globalLocale._abbr;\n            require('./locale/' + name);\n            // because defineLocale currently also sets the global locale, we\n            // want to undo that for lazy loaded locales\n            getSetGlobalLocale(oldLocale);\n        } catch (e) { }\n    }\n    return locales[name];\n}\n\n// This function will load locale and then set the global locale.  If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale (key, values) {\n    var data;\n    if (key) {\n        if (isUndefined(values)) {\n            data = getLocale(key);\n        }\n        else {\n            data = defineLocale(key, values);\n        }\n\n        if (data) {\n            // moment.duration._locale = moment._locale = data;\n            globalLocale = data;\n        }\n    }\n\n    return globalLocale._abbr;\n}\n\nfunction defineLocale (name, config) {\n    if (config !== null) {\n        var parentConfig = baseConfig;\n        config.abbr = name;\n        if (locales[name] != null) {\n            deprecateSimple('defineLocaleOverride',\n                    'use moment.updateLocale(localeName, config) to change ' +\n                    'an existing locale. moment.defineLocale(localeName, ' +\n                    'config) should only be used for creating a new locale ' +\n                    'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n            parentConfig = locales[name]._config;\n        } else if (config.parentLocale != null) {\n            if (locales[config.parentLocale] != null) {\n                parentConfig = locales[config.parentLocale]._config;\n            } else {\n                if (!localeFamilies[config.parentLocale]) {\n                    localeFamilies[config.parentLocale] = [];\n                }\n                localeFamilies[config.parentLocale].push({\n                    name: name,\n                    config: config\n                });\n                return null;\n            }\n        }\n        locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n        if (localeFamilies[name]) {\n            localeFamilies[name].forEach(function (x) {\n                defineLocale(x.name, x.config);\n            });\n        }\n\n        // backwards compat for now: also set the locale\n        // make sure we set the locale AFTER all child locales have been\n        // created, so we won't end up with the child locale set.\n        getSetGlobalLocale(name);\n\n\n        return locales[name];\n    } else {\n        // useful for testing\n        delete locales[name];\n        return null;\n    }\n}\n\nfunction updateLocale(name, config) {\n    if (config != null) {\n        var locale, parentConfig = baseConfig;\n        // MERGE\n        if (locales[name] != null) {\n            parentConfig = locales[name]._config;\n        }\n        config = mergeConfigs(parentConfig, config);\n        locale = new Locale(config);\n        locale.parentLocale = locales[name];\n        locales[name] = locale;\n\n        // backwards compat for now: also set the locale\n        getSetGlobalLocale(name);\n    } else {\n        // pass null for config to unupdate, useful for tests\n        if (locales[name] != null) {\n            if (locales[name].parentLocale != null) {\n                locales[name] = locales[name].parentLocale;\n            } else if (locales[name] != null) {\n                delete locales[name];\n            }\n        }\n    }\n    return locales[name];\n}\n\n// returns locale data\nfunction getLocale (key) {\n    var locale;\n\n    if (key && key._locale && key._locale._abbr) {\n        key = key._locale._abbr;\n    }\n\n    if (!key) {\n        return globalLocale;\n    }\n\n    if (!isArray(key)) {\n        //short-circuit everything else\n        locale = loadLocale(key);\n        if (locale) {\n            return locale;\n        }\n        key = [key];\n    }\n\n    return chooseLocale(key);\n}\n\nfunction listLocales() {\n    return keys$1(locales);\n}\n\nfunction checkOverflow (m) {\n    var overflow;\n    var a = m._a;\n\n    if (a && getParsingFlags(m).overflow === -2) {\n        overflow =\n            a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :\n            a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n            a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n            a[MINUTE]      < 0 || a[MINUTE]      > 59  ? MINUTE :\n            a[SECOND]      < 0 || a[SECOND]      > 59  ? SECOND :\n            a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n            -1;\n\n        if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n            overflow = DATE;\n        }\n        if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n            overflow = WEEK;\n        }\n        if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n            overflow = WEEKDAY;\n        }\n\n        getParsingFlags(m).overflow = overflow;\n    }\n\n    return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\nvar basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\nvar tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\nvar isoDates = [\n    ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n    ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n    ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n    ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n    ['YYYY-DDD', /\\d{4}-\\d{3}/],\n    ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n    ['YYYYYYMMDD', /[+-]\\d{10}/],\n    ['YYYYMMDD', /\\d{8}/],\n    // YYYYMM is NOT allowed by the standard\n    ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n    ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n    ['YYYYDDD', /\\d{7}/]\n];\n\n// iso time formats and regexes\nvar isoTimes = [\n    ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n    ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n    ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n    ['HH:mm', /\\d\\d:\\d\\d/],\n    ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n    ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n    ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n    ['HHmm', /\\d\\d\\d\\d/],\n    ['HH', /\\d\\d/]\n];\n\nvar aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n// date from iso format\nfunction configFromISO(config) {\n    var i, l,\n        string = config._i,\n        match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n        allowTime, dateFormat, timeFormat, tzFormat;\n\n    if (match) {\n        getParsingFlags(config).iso = true;\n\n        for (i = 0, l = isoDates.length; i < l; i++) {\n            if (isoDates[i][1].exec(match[1])) {\n                dateFormat = isoDates[i][0];\n                allowTime = isoDates[i][2] !== false;\n                break;\n            }\n        }\n        if (dateFormat == null) {\n            config._isValid = false;\n            return;\n        }\n        if (match[3]) {\n            for (i = 0, l = isoTimes.length; i < l; i++) {\n                if (isoTimes[i][1].exec(match[3])) {\n                    // match[2] should be 'T' or space\n                    timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                    break;\n                }\n            }\n            if (timeFormat == null) {\n                config._isValid = false;\n                return;\n            }\n        }\n        if (!allowTime && timeFormat != null) {\n            config._isValid = false;\n            return;\n        }\n        if (match[4]) {\n            if (tzRegex.exec(match[4])) {\n                tzFormat = 'Z';\n            } else {\n                config._isValid = false;\n                return;\n            }\n        }\n        config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n        configFromStringAndFormat(config);\n    } else {\n        config._isValid = false;\n    }\n}\n\n// date from iso format or fallback\nfunction configFromString(config) {\n    var matched = aspNetJsonRegex.exec(config._i);\n\n    if (matched !== null) {\n        config._d = new Date(+matched[1]);\n        return;\n    }\n\n    configFromISO(config);\n    if (config._isValid === false) {\n        delete config._isValid;\n        hooks.createFromInputFallback(config);\n    }\n}\n\nhooks.createFromInputFallback = deprecate(\n    'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +\n    'which is not reliable across all browsers and versions. Non ISO date formats are ' +\n    'discouraged and will be removed in an upcoming major release. Please refer to ' +\n    'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n    function (config) {\n        config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n    }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n    if (a != null) {\n        return a;\n    }\n    if (b != null) {\n        return b;\n    }\n    return c;\n}\n\nfunction currentDateArray(config) {\n    // hooks is actually the exported moment object\n    var nowValue = new Date(hooks.now());\n    if (config._useUTC) {\n        return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n    }\n    return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray (config) {\n    var i, date, input = [], currentDate, yearToUse;\n\n    if (config._d) {\n        return;\n    }\n\n    currentDate = currentDateArray(config);\n\n    //compute day of the year from weeks and weekdays\n    if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n        dayOfYearFromWeekInfo(config);\n    }\n\n    //if the day of the year is set, figure out what it is\n    if (config._dayOfYear) {\n        yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n        if (config._dayOfYear > daysInYear(yearToUse)) {\n            getParsingFlags(config)._overflowDayOfYear = true;\n        }\n\n        date = createUTCDate(yearToUse, 0, config._dayOfYear);\n        config._a[MONTH] = date.getUTCMonth();\n        config._a[DATE] = date.getUTCDate();\n    }\n\n    // Default to current date.\n    // * if no year, month, day of month are given, default to today\n    // * if day of month is given, default month and year\n    // * if month is given, default only year\n    // * if year is given, don't default anything\n    for (i = 0; i < 3 && config._a[i] == null; ++i) {\n        config._a[i] = input[i] = currentDate[i];\n    }\n\n    // Zero out whatever was not defaulted, including time\n    for (; i < 7; i++) {\n        config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n    }\n\n    // Check for 24:00:00.000\n    if (config._a[HOUR] === 24 &&\n            config._a[MINUTE] === 0 &&\n            config._a[SECOND] === 0 &&\n            config._a[MILLISECOND] === 0) {\n        config._nextDay = true;\n        config._a[HOUR] = 0;\n    }\n\n    config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n    // Apply timezone offset from input. The actual utcOffset can be changed\n    // with parseZone.\n    if (config._tzm != null) {\n        config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n    }\n\n    if (config._nextDay) {\n        config._a[HOUR] = 24;\n    }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n    var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n    w = config._w;\n    if (w.GG != null || w.W != null || w.E != null) {\n        dow = 1;\n        doy = 4;\n\n        // TODO: We need to take the current isoWeekYear, but that depends on\n        // how we interpret now (local, utc, fixed offset). So create\n        // a now version of current config (take local/utc/offset flags, and\n        // create now).\n        weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n        week = defaults(w.W, 1);\n        weekday = defaults(w.E, 1);\n        if (weekday < 1 || weekday > 7) {\n            weekdayOverflow = true;\n        }\n    } else {\n        dow = config._locale._week.dow;\n        doy = config._locale._week.doy;\n\n        var curWeek = weekOfYear(createLocal(), dow, doy);\n\n        weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n        // Default to current week.\n        week = defaults(w.w, curWeek.week);\n\n        if (w.d != null) {\n            // weekday -- low day numbers are considered next week\n            weekday = w.d;\n            if (weekday < 0 || weekday > 6) {\n                weekdayOverflow = true;\n            }\n        } else if (w.e != null) {\n            // local weekday -- counting starts from begining of week\n            weekday = w.e + dow;\n            if (w.e < 0 || w.e > 6) {\n                weekdayOverflow = true;\n            }\n        } else {\n            // default to begining of week\n            weekday = dow;\n        }\n    }\n    if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n        getParsingFlags(config)._overflowWeeks = true;\n    } else if (weekdayOverflow != null) {\n        getParsingFlags(config)._overflowWeekday = true;\n    } else {\n        temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n        config._a[YEAR] = temp.year;\n        config._dayOfYear = temp.dayOfYear;\n    }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n    // TODO: Move this to another part of the creation flow to prevent circular deps\n    if (config._f === hooks.ISO_8601) {\n        configFromISO(config);\n        return;\n    }\n\n    config._a = [];\n    getParsingFlags(config).empty = true;\n\n    // This array is used to make a Date, either with `new Date` or `Date.UTC`\n    var string = '' + config._i,\n        i, parsedInput, tokens, token, skipped,\n        stringLength = string.length,\n        totalParsedInputLength = 0;\n\n    tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n    for (i = 0; i < tokens.length; i++) {\n        token = tokens[i];\n        parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n        // console.log('token', token, 'parsedInput', parsedInput,\n        //         'regex', getParseRegexForToken(token, config));\n        if (parsedInput) {\n            skipped = string.substr(0, string.indexOf(parsedInput));\n            if (skipped.length > 0) {\n                getParsingFlags(config).unusedInput.push(skipped);\n            }\n            string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n            totalParsedInputLength += parsedInput.length;\n        }\n        // don't parse if it's not a known token\n        if (formatTokenFunctions[token]) {\n            if (parsedInput) {\n                getParsingFlags(config).empty = false;\n            }\n            else {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n            addTimeToArrayFromToken(token, parsedInput, config);\n        }\n        else if (config._strict && !parsedInput) {\n            getParsingFlags(config).unusedTokens.push(token);\n        }\n    }\n\n    // add remaining unparsed input length to the string\n    getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n    if (string.length > 0) {\n        getParsingFlags(config).unusedInput.push(string);\n    }\n\n    // clear _12h flag if hour is <= 12\n    if (config._a[HOUR] <= 12 &&\n        getParsingFlags(config).bigHour === true &&\n        config._a[HOUR] > 0) {\n        getParsingFlags(config).bigHour = undefined;\n    }\n\n    getParsingFlags(config).parsedDateParts = config._a.slice(0);\n    getParsingFlags(config).meridiem = config._meridiem;\n    // handle meridiem\n    config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n    configFromArray(config);\n    checkOverflow(config);\n}\n\n\nfunction meridiemFixWrap (locale, hour, meridiem) {\n    var isPm;\n\n    if (meridiem == null) {\n        // nothing to do\n        return hour;\n    }\n    if (locale.meridiemHour != null) {\n        return locale.meridiemHour(hour, meridiem);\n    } else if (locale.isPM != null) {\n        // Fallback\n        isPm = locale.isPM(meridiem);\n        if (isPm && hour < 12) {\n            hour += 12;\n        }\n        if (!isPm && hour === 12) {\n            hour = 0;\n        }\n        return hour;\n    } else {\n        // this is not supposed to happen\n        return hour;\n    }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n    var tempConfig,\n        bestMoment,\n\n        scoreToBeat,\n        i,\n        currentScore;\n\n    if (config._f.length === 0) {\n        getParsingFlags(config).invalidFormat = true;\n        config._d = new Date(NaN);\n        return;\n    }\n\n    for (i = 0; i < config._f.length; i++) {\n        currentScore = 0;\n        tempConfig = copyConfig({}, config);\n        if (config._useUTC != null) {\n            tempConfig._useUTC = config._useUTC;\n        }\n        tempConfig._f = config._f[i];\n        configFromStringAndFormat(tempConfig);\n\n        if (!isValid(tempConfig)) {\n            continue;\n        }\n\n        // if there is any input that was not parsed add a penalty for that format\n        currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n        //or tokens\n        currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n        getParsingFlags(tempConfig).score = currentScore;\n\n        if (scoreToBeat == null || currentScore < scoreToBeat) {\n            scoreToBeat = currentScore;\n            bestMoment = tempConfig;\n        }\n    }\n\n    extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n    if (config._d) {\n        return;\n    }\n\n    var i = normalizeObjectUnits(config._i);\n    config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n        return obj && parseInt(obj, 10);\n    });\n\n    configFromArray(config);\n}\n\nfunction createFromConfig (config) {\n    var res = new Moment(checkOverflow(prepareConfig(config)));\n    if (res._nextDay) {\n        // Adding is smart enough around DST\n        res.add(1, 'd');\n        res._nextDay = undefined;\n    }\n\n    return res;\n}\n\nfunction prepareConfig (config) {\n    var input = config._i,\n        format = config._f;\n\n    config._locale = config._locale || getLocale(config._l);\n\n    if (input === null || (format === undefined && input === '')) {\n        return createInvalid({nullInput: true});\n    }\n\n    if (typeof input === 'string') {\n        config._i = input = config._locale.preparse(input);\n    }\n\n    if (isMoment(input)) {\n        return new Moment(checkOverflow(input));\n    } else if (isDate(input)) {\n        config._d = input;\n    } else if (isArray(format)) {\n        configFromStringAndArray(config);\n    } else if (format) {\n        configFromStringAndFormat(config);\n    }  else {\n        configFromInput(config);\n    }\n\n    if (!isValid(config)) {\n        config._d = null;\n    }\n\n    return config;\n}\n\nfunction configFromInput(config) {\n    var input = config._i;\n    if (input === undefined) {\n        config._d = new Date(hooks.now());\n    } else if (isDate(input)) {\n        config._d = new Date(input.valueOf());\n    } else if (typeof input === 'string') {\n        configFromString(config);\n    } else if (isArray(input)) {\n        config._a = map(input.slice(0), function (obj) {\n            return parseInt(obj, 10);\n        });\n        configFromArray(config);\n    } else if (typeof(input) === 'object') {\n        configFromObject(config);\n    } else if (isNumber(input)) {\n        // from milliseconds\n        config._d = new Date(input);\n    } else {\n        hooks.createFromInputFallback(config);\n    }\n}\n\nfunction createLocalOrUTC (input, format, locale, strict, isUTC) {\n    var c = {};\n\n    if (locale === true || locale === false) {\n        strict = locale;\n        locale = undefined;\n    }\n\n    if ((isObject(input) && isObjectEmpty(input)) ||\n            (isArray(input) && input.length === 0)) {\n        input = undefined;\n    }\n    // object construction must be done this way.\n    // https://github.com/moment/moment/issues/1423\n    c._isAMomentObject = true;\n    c._useUTC = c._isUTC = isUTC;\n    c._l = locale;\n    c._i = input;\n    c._f = format;\n    c._strict = strict;\n\n    return createFromConfig(c);\n}\n\nfunction createLocal (input, format, locale, strict) {\n    return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n    'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n    function () {\n        var other = createLocal.apply(null, arguments);\n        if (this.isValid() && other.isValid()) {\n            return other < this ? this : other;\n        } else {\n            return createInvalid();\n        }\n    }\n);\n\nvar prototypeMax = deprecate(\n    'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n    function () {\n        var other = createLocal.apply(null, arguments);\n        if (this.isValid() && other.isValid()) {\n            return other > this ? this : other;\n        } else {\n            return createInvalid();\n        }\n    }\n);\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n    var res, i;\n    if (moments.length === 1 && isArray(moments[0])) {\n        moments = moments[0];\n    }\n    if (!moments.length) {\n        return createLocal();\n    }\n    res = moments[0];\n    for (i = 1; i < moments.length; ++i) {\n        if (!moments[i].isValid() || moments[i][fn](res)) {\n            res = moments[i];\n        }\n    }\n    return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min () {\n    var args = [].slice.call(arguments, 0);\n\n    return pickBy('isBefore', args);\n}\n\nfunction max () {\n    var args = [].slice.call(arguments, 0);\n\n    return pickBy('isAfter', args);\n}\n\nvar now = function () {\n    return Date.now ? Date.now() : +(new Date());\n};\n\nfunction Duration (duration) {\n    var normalizedInput = normalizeObjectUnits(duration),\n        years = normalizedInput.year || 0,\n        quarters = normalizedInput.quarter || 0,\n        months = normalizedInput.month || 0,\n        weeks = normalizedInput.week || 0,\n        days = normalizedInput.day || 0,\n        hours = normalizedInput.hour || 0,\n        minutes = normalizedInput.minute || 0,\n        seconds = normalizedInput.second || 0,\n        milliseconds = normalizedInput.millisecond || 0;\n\n    // representation for dateAddRemove\n    this._milliseconds = +milliseconds +\n        seconds * 1e3 + // 1000\n        minutes * 6e4 + // 1000 * 60\n        hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n    // Because of dateAddRemove treats 24 hours as different from a\n    // day when working around DST, we need to store them separately\n    this._days = +days +\n        weeks * 7;\n    // It is impossible translate months into days without knowing\n    // which months you are are talking about, so we have to store\n    // it separately.\n    this._months = +months +\n        quarters * 3 +\n        years * 12;\n\n    this._data = {};\n\n    this._locale = getLocale();\n\n    this._bubble();\n}\n\nfunction isDuration (obj) {\n    return obj instanceof Duration;\n}\n\nfunction absRound (number) {\n    if (number < 0) {\n        return Math.round(-1 * number) * -1;\n    } else {\n        return Math.round(number);\n    }\n}\n\n// FORMATTING\n\nfunction offset (token, separator) {\n    addFormatToken(token, 0, 0, function () {\n        var offset = this.utcOffset();\n        var sign = '+';\n        if (offset < 0) {\n            offset = -offset;\n            sign = '-';\n        }\n        return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n    });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z',  matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n    config._useUTC = true;\n    config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10',  '00']\n// '-1530'  > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n    var matches = (string || '').match(matcher);\n\n    if (matches === null) {\n        return null;\n    }\n\n    var chunk   = matches[matches.length - 1] || [];\n    var parts   = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n    var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n    return minutes === 0 ?\n      0 :\n      parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n    var res, diff;\n    if (model._isUTC) {\n        res = model.clone();\n        diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n        // Use low-level api, because this fn is low-level api.\n        res._d.setTime(res._d.valueOf() + diff);\n        hooks.updateOffset(res, false);\n        return res;\n    } else {\n        return createLocal(input).local();\n    }\n}\n\nfunction getDateOffset (m) {\n    // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n    // https://github.com/moment/moment/pull/1871\n    return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset (input, keepLocalTime) {\n    var offset = this._offset || 0,\n        localAdjust;\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n    if (input != null) {\n        if (typeof input === 'string') {\n            input = offsetFromString(matchShortOffset, input);\n            if (input === null) {\n                return this;\n            }\n        } else if (Math.abs(input) < 16) {\n            input = input * 60;\n        }\n        if (!this._isUTC && keepLocalTime) {\n            localAdjust = getDateOffset(this);\n        }\n        this._offset = input;\n        this._isUTC = true;\n        if (localAdjust != null) {\n            this.add(localAdjust, 'm');\n        }\n        if (offset !== input) {\n            if (!keepLocalTime || this._changeInProgress) {\n                addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n            } else if (!this._changeInProgress) {\n                this._changeInProgress = true;\n                hooks.updateOffset(this, true);\n                this._changeInProgress = null;\n            }\n        }\n        return this;\n    } else {\n        return this._isUTC ? offset : getDateOffset(this);\n    }\n}\n\nfunction getSetZone (input, keepLocalTime) {\n    if (input != null) {\n        if (typeof input !== 'string') {\n            input = -input;\n        }\n\n        this.utcOffset(input, keepLocalTime);\n\n        return this;\n    } else {\n        return -this.utcOffset();\n    }\n}\n\nfunction setOffsetToUTC (keepLocalTime) {\n    return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal (keepLocalTime) {\n    if (this._isUTC) {\n        this.utcOffset(0, keepLocalTime);\n        this._isUTC = false;\n\n        if (keepLocalTime) {\n            this.subtract(getDateOffset(this), 'm');\n        }\n    }\n    return this;\n}\n\nfunction setOffsetToParsedOffset () {\n    if (this._tzm != null) {\n        this.utcOffset(this._tzm);\n    } else if (typeof this._i === 'string') {\n        var tZone = offsetFromString(matchOffset, this._i);\n        if (tZone != null) {\n            this.utcOffset(tZone);\n        }\n        else {\n            this.utcOffset(0, true);\n        }\n    }\n    return this;\n}\n\nfunction hasAlignedHourOffset (input) {\n    if (!this.isValid()) {\n        return false;\n    }\n    input = input ? createLocal(input).utcOffset() : 0;\n\n    return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime () {\n    return (\n        this.utcOffset() > this.clone().month(0).utcOffset() ||\n        this.utcOffset() > this.clone().month(5).utcOffset()\n    );\n}\n\nfunction isDaylightSavingTimeShifted () {\n    if (!isUndefined(this._isDSTShifted)) {\n        return this._isDSTShifted;\n    }\n\n    var c = {};\n\n    copyConfig(c, this);\n    c = prepareConfig(c);\n\n    if (c._a) {\n        var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n        this._isDSTShifted = this.isValid() &&\n            compareArrays(c._a, other.toArray()) > 0;\n    } else {\n        this._isDSTShifted = false;\n    }\n\n    return this._isDSTShifted;\n}\n\nfunction isLocal () {\n    return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset () {\n    return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc () {\n    return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n// and further modified to allow for strings containing both week and day\nvar isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\n\nfunction createDuration (input, key) {\n    var duration = input,\n        // matching against regexp is expensive, do it on demand\n        match = null,\n        sign,\n        ret,\n        diffRes;\n\n    if (isDuration(input)) {\n        duration = {\n            ms : input._milliseconds,\n            d  : input._days,\n            M  : input._months\n        };\n    } else if (isNumber(input)) {\n        duration = {};\n        if (key) {\n            duration[key] = input;\n        } else {\n            duration.milliseconds = input;\n        }\n    } else if (!!(match = aspNetRegex.exec(input))) {\n        sign = (match[1] === '-') ? -1 : 1;\n        duration = {\n            y  : 0,\n            d  : toInt(match[DATE])                         * sign,\n            h  : toInt(match[HOUR])                         * sign,\n            m  : toInt(match[MINUTE])                       * sign,\n            s  : toInt(match[SECOND])                       * sign,\n            ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n        };\n    } else if (!!(match = isoRegex.exec(input))) {\n        sign = (match[1] === '-') ? -1 : 1;\n        duration = {\n            y : parseIso(match[2], sign),\n            M : parseIso(match[3], sign),\n            w : parseIso(match[4], sign),\n            d : parseIso(match[5], sign),\n            h : parseIso(match[6], sign),\n            m : parseIso(match[7], sign),\n            s : parseIso(match[8], sign)\n        };\n    } else if (duration == null) {// checks for null or undefined\n        duration = {};\n    } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n        diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n        duration = {};\n        duration.ms = diffRes.milliseconds;\n        duration.M = diffRes.months;\n    }\n\n    ret = new Duration(duration);\n\n    if (isDuration(input) && hasOwnProp(input, '_locale')) {\n        ret._locale = input._locale;\n    }\n\n    return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\n\nfunction parseIso (inp, sign) {\n    // We'd normally use ~~inp for this, but unfortunately it also\n    // converts floats to ints.\n    // inp may be undefined, so careful calling replace on it.\n    var res = inp && parseFloat(inp.replace(',', '.'));\n    // apply sign while we're at it\n    return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n    var res = {milliseconds: 0, months: 0};\n\n    res.months = other.month() - base.month() +\n        (other.year() - base.year()) * 12;\n    if (base.clone().add(res.months, 'M').isAfter(other)) {\n        --res.months;\n    }\n\n    res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n    return res;\n}\n\nfunction momentsDifference(base, other) {\n    var res;\n    if (!(base.isValid() && other.isValid())) {\n        return {milliseconds: 0, months: 0};\n    }\n\n    other = cloneWithOffset(other, base);\n    if (base.isBefore(other)) {\n        res = positiveMomentsDifference(base, other);\n    } else {\n        res = positiveMomentsDifference(other, base);\n        res.milliseconds = -res.milliseconds;\n        res.months = -res.months;\n    }\n\n    return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n    return function (val, period) {\n        var dur, tmp;\n        //invert the arguments, but complain about it\n        if (period !== null && !isNaN(+period)) {\n            deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n            'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n            tmp = val; val = period; period = tmp;\n        }\n\n        val = typeof val === 'string' ? +val : val;\n        dur = createDuration(val, period);\n        addSubtract(this, dur, direction);\n        return this;\n    };\n}\n\nfunction addSubtract (mom, duration, isAdding, updateOffset) {\n    var milliseconds = duration._milliseconds,\n        days = absRound(duration._days),\n        months = absRound(duration._months);\n\n    if (!mom.isValid()) {\n        // No op\n        return;\n    }\n\n    updateOffset = updateOffset == null ? true : updateOffset;\n\n    if (milliseconds) {\n        mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n    }\n    if (days) {\n        set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n    }\n    if (months) {\n        setMonth(mom, get(mom, 'Month') + months * isAdding);\n    }\n    if (updateOffset) {\n        hooks.updateOffset(mom, days || months);\n    }\n}\n\nvar add      = createAdder(1, 'add');\nvar subtract = createAdder(-1, 'subtract');\n\nfunction getCalendarFormat(myMoment, now) {\n    var diff = myMoment.diff(now, 'days', true);\n    return diff < -6 ? 'sameElse' :\n            diff < -1 ? 'lastWeek' :\n            diff < 0 ? 'lastDay' :\n            diff < 1 ? 'sameDay' :\n            diff < 2 ? 'nextDay' :\n            diff < 7 ? 'nextWeek' : 'sameElse';\n}\n\nfunction calendar$1 (time, formats) {\n    // We want to compare the start of today, vs this.\n    // Getting start-of-today depends on whether we're local/utc/offset or not.\n    var now = time || createLocal(),\n        sod = cloneWithOffset(now, this).startOf('day'),\n        format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n    var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n    return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n}\n\nfunction clone () {\n    return new Moment(this);\n}\n\nfunction isAfter (input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input);\n    if (!(this.isValid() && localInput.isValid())) {\n        return false;\n    }\n    units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n    if (units === 'millisecond') {\n        return this.valueOf() > localInput.valueOf();\n    } else {\n        return localInput.valueOf() < this.clone().startOf(units).valueOf();\n    }\n}\n\nfunction isBefore (input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input);\n    if (!(this.isValid() && localInput.isValid())) {\n        return false;\n    }\n    units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n    if (units === 'millisecond') {\n        return this.valueOf() < localInput.valueOf();\n    } else {\n        return this.clone().endOf(units).valueOf() < localInput.valueOf();\n    }\n}\n\nfunction isBetween (from, to, units, inclusivity) {\n    inclusivity = inclusivity || '()';\n    return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\n        (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n}\n\nfunction isSame (input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input),\n        inputMs;\n    if (!(this.isValid() && localInput.isValid())) {\n        return false;\n    }\n    units = normalizeUnits(units || 'millisecond');\n    if (units === 'millisecond') {\n        return this.valueOf() === localInput.valueOf();\n    } else {\n        inputMs = localInput.valueOf();\n        return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n    }\n}\n\nfunction isSameOrAfter (input, units) {\n    return this.isSame(input, units) || this.isAfter(input,units);\n}\n\nfunction isSameOrBefore (input, units) {\n    return this.isSame(input, units) || this.isBefore(input,units);\n}\n\nfunction diff (input, units, asFloat) {\n    var that,\n        zoneDelta,\n        delta, output;\n\n    if (!this.isValid()) {\n        return NaN;\n    }\n\n    that = cloneWithOffset(input, this);\n\n    if (!that.isValid()) {\n        return NaN;\n    }\n\n    zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n    units = normalizeUnits(units);\n\n    if (units === 'year' || units === 'month' || units === 'quarter') {\n        output = monthDiff(this, that);\n        if (units === 'quarter') {\n            output = output / 3;\n        } else if (units === 'year') {\n            output = output / 12;\n        }\n    } else {\n        delta = this - that;\n        output = units === 'second' ? delta / 1e3 : // 1000\n            units === 'minute' ? delta / 6e4 : // 1000 * 60\n            units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n            units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n            units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n            delta;\n    }\n    return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff (a, b) {\n    // difference in months\n    var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n        // b is in (anchor - 1 month, anchor + 1 month)\n        anchor = a.clone().add(wholeMonthDiff, 'months'),\n        anchor2, adjust;\n\n    if (b - anchor < 0) {\n        anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n        // linear across the month\n        adjust = (b - anchor) / (anchor - anchor2);\n    } else {\n        anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n        // linear across the month\n        adjust = (b - anchor) / (anchor2 - anchor);\n    }\n\n    //check for negative zero, return zero if negative zero\n    return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString () {\n    return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString () {\n    var m = this.clone().utc();\n    if (0 < m.year() && m.year() <= 9999) {\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            return this.toDate().toISOString();\n        } else {\n            return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n        }\n    } else {\n        return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n    }\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect () {\n    if (!this.isValid()) {\n        return 'moment.invalid(/* ' + this._i + ' */)';\n    }\n    var func = 'moment';\n    var zone = '';\n    if (!this.isLocal()) {\n        func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n        zone = 'Z';\n    }\n    var prefix = '[' + func + '(\"]';\n    var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n    var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n    var suffix = zone + '[\")]';\n\n    return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format (inputString) {\n    if (!inputString) {\n        inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n    }\n    var output = formatMoment(this, inputString);\n    return this.localeData().postformat(output);\n}\n\nfunction from (time, withoutSuffix) {\n    if (this.isValid() &&\n            ((isMoment(time) && time.isValid()) ||\n             createLocal(time).isValid())) {\n        return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n    } else {\n        return this.localeData().invalidDate();\n    }\n}\n\nfunction fromNow (withoutSuffix) {\n    return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to (time, withoutSuffix) {\n    if (this.isValid() &&\n            ((isMoment(time) && time.isValid()) ||\n             createLocal(time).isValid())) {\n        return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n    } else {\n        return this.localeData().invalidDate();\n    }\n}\n\nfunction toNow (withoutSuffix) {\n    return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance.  Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale (key) {\n    var newLocaleData;\n\n    if (key === undefined) {\n        return this._locale._abbr;\n    } else {\n        newLocaleData = getLocale(key);\n        if (newLocaleData != null) {\n            this._locale = newLocaleData;\n        }\n        return this;\n    }\n}\n\nvar lang = deprecate(\n    'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n    function (key) {\n        if (key === undefined) {\n            return this.localeData();\n        } else {\n            return this.locale(key);\n        }\n    }\n);\n\nfunction localeData () {\n    return this._locale;\n}\n\nfunction startOf (units) {\n    units = normalizeUnits(units);\n    // the following switch intentionally omits break keywords\n    // to utilize falling through the cases.\n    switch (units) {\n        case 'year':\n            this.month(0);\n            /* falls through */\n        case 'quarter':\n        case 'month':\n            this.date(1);\n            /* falls through */\n        case 'week':\n        case 'isoWeek':\n        case 'day':\n        case 'date':\n            this.hours(0);\n            /* falls through */\n        case 'hour':\n            this.minutes(0);\n            /* falls through */\n        case 'minute':\n            this.seconds(0);\n            /* falls through */\n        case 'second':\n            this.milliseconds(0);\n    }\n\n    // weeks are a special case\n    if (units === 'week') {\n        this.weekday(0);\n    }\n    if (units === 'isoWeek') {\n        this.isoWeekday(1);\n    }\n\n    // quarters are also special\n    if (units === 'quarter') {\n        this.month(Math.floor(this.month() / 3) * 3);\n    }\n\n    return this;\n}\n\nfunction endOf (units) {\n    units = normalizeUnits(units);\n    if (units === undefined || units === 'millisecond') {\n        return this;\n    }\n\n    // 'date' is an alias for 'day', so it should be considered as such.\n    if (units === 'date') {\n        units = 'day';\n    }\n\n    return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n}\n\nfunction valueOf () {\n    return this._d.valueOf() - ((this._offset || 0) * 60000);\n}\n\nfunction unix () {\n    return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate () {\n    return new Date(this.valueOf());\n}\n\nfunction toArray () {\n    var m = this;\n    return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n}\n\nfunction toObject () {\n    var m = this;\n    return {\n        years: m.year(),\n        months: m.month(),\n        date: m.date(),\n        hours: m.hours(),\n        minutes: m.minutes(),\n        seconds: m.seconds(),\n        milliseconds: m.milliseconds()\n    };\n}\n\nfunction toJSON () {\n    // new Date(NaN).toJSON() === null\n    return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$1 () {\n    return isValid(this);\n}\n\nfunction parsingFlags () {\n    return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt () {\n    return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n    return {\n        input: this._i,\n        format: this._f,\n        locale: this._locale,\n        isUTC: this._isUTC,\n        strict: this._strict\n    };\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n    return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n    return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken (token, getter) {\n    addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg',     'weekYear');\naddWeekYearFormatToken('ggggg',    'weekYear');\naddWeekYearFormatToken('GGGG',  'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n\n// PARSING\n\naddRegexToken('G',      matchSigned);\naddRegexToken('g',      matchSigned);\naddRegexToken('GG',     match1to2, match2);\naddRegexToken('gg',     match1to2, match2);\naddRegexToken('GGGG',   match1to4, match4);\naddRegexToken('gggg',   match1to4, match4);\naddRegexToken('GGGGG',  match1to6, match6);\naddRegexToken('ggggg',  match1to6, match6);\n\naddWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n    week[token.substr(0, 2)] = toInt(input);\n});\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n    week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear (input) {\n    return getSetWeekYearHelper.call(this,\n            input,\n            this.week(),\n            this.weekday(),\n            this.localeData()._week.dow,\n            this.localeData()._week.doy);\n}\n\nfunction getSetISOWeekYear (input) {\n    return getSetWeekYearHelper.call(this,\n            input, this.isoWeek(), this.isoWeekday(), 1, 4);\n}\n\nfunction getISOWeeksInYear () {\n    return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getWeeksInYear () {\n    var weekInfo = this.localeData()._week;\n    return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n    var weeksTarget;\n    if (input == null) {\n        return weekOfYear(this, dow, doy).year;\n    } else {\n        weeksTarget = weeksInYear(input, dow, doy);\n        if (week > weeksTarget) {\n            week = weeksTarget;\n        }\n        return setWeekAll.call(this, input, week, weekday, dow, doy);\n    }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n    var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n        date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n    this.year(date.getUTCFullYear());\n    this.month(date.getUTCMonth());\n    this.date(date.getUTCDate());\n    return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n    array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter (input) {\n    return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIOROITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D',  match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n    return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n    array[DATE] = toInt(input.match(match1to2)[0], 10);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD',  match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n    config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear (input) {\n    var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n    return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m',  match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s',  match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n    return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n    return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n    return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n    return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n    return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n    return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n    return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n    return this.millisecond() * 1000000;\n});\n\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S',    match1to3, match1);\naddRegexToken('SS',   match1to3, match2);\naddRegexToken('SSS',  match1to3, match3);\n\nvar token;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n    addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n    array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n    addParseToken(token, parseMs);\n}\n// MOMENTS\n\nvar getSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z',  0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr () {\n    return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName () {\n    return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add               = add;\nproto.calendar          = calendar$1;\nproto.clone             = clone;\nproto.diff              = diff;\nproto.endOf             = endOf;\nproto.format            = format;\nproto.from              = from;\nproto.fromNow           = fromNow;\nproto.to                = to;\nproto.toNow             = toNow;\nproto.get               = stringGet;\nproto.invalidAt         = invalidAt;\nproto.isAfter           = isAfter;\nproto.isBefore          = isBefore;\nproto.isBetween         = isBetween;\nproto.isSame            = isSame;\nproto.isSameOrAfter     = isSameOrAfter;\nproto.isSameOrBefore    = isSameOrBefore;\nproto.isValid           = isValid$1;\nproto.lang              = lang;\nproto.locale            = locale;\nproto.localeData        = localeData;\nproto.max               = prototypeMax;\nproto.min               = prototypeMin;\nproto.parsingFlags      = parsingFlags;\nproto.set               = stringSet;\nproto.startOf           = startOf;\nproto.subtract          = subtract;\nproto.toArray           = toArray;\nproto.toObject          = toObject;\nproto.toDate            = toDate;\nproto.toISOString       = toISOString;\nproto.inspect           = inspect;\nproto.toJSON            = toJSON;\nproto.toString          = toString;\nproto.unix              = unix;\nproto.valueOf           = valueOf;\nproto.creationData      = creationData;\n\n// Year\nproto.year       = getSetYear;\nproto.isLeapYear = getIsLeapYear;\n\n// Week Year\nproto.weekYear    = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\n\n// Quarter\nproto.quarter = proto.quarters = getSetQuarter;\n\n// Month\nproto.month       = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\n\n// Week\nproto.week           = proto.weeks        = getSetWeek;\nproto.isoWeek        = proto.isoWeeks     = getSetISOWeek;\nproto.weeksInYear    = getWeeksInYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\n\n// Day\nproto.date       = getSetDayOfMonth;\nproto.day        = proto.days             = getSetDayOfWeek;\nproto.weekday    = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear  = getSetDayOfYear;\n\n// Hour\nproto.hour = proto.hours = getSetHour;\n\n// Minute\nproto.minute = proto.minutes = getSetMinute;\n\n// Second\nproto.second = proto.seconds = getSetSecond;\n\n// Millisecond\nproto.millisecond = proto.milliseconds = getSetMillisecond;\n\n// Offset\nproto.utcOffset            = getSetOffset;\nproto.utc                  = setOffsetToUTC;\nproto.local                = setOffsetToLocal;\nproto.parseZone            = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST                = isDaylightSavingTime;\nproto.isLocal              = isLocal;\nproto.isUtcOffset          = isUtcOffset;\nproto.isUtc                = isUtc;\nproto.isUTC                = isUtc;\n\n// Timezone\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\n\n// Deprecations\nproto.dates  = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\nproto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\nproto.years  = deprecate('years accessor is deprecated. Use year instead', getSetYear);\nproto.zone   = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\nproto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\nfunction createUnix (input) {\n    return createLocal(input * 1000);\n}\n\nfunction createInZone () {\n    return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat (string) {\n    return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar        = calendar;\nproto$1.longDateFormat  = longDateFormat;\nproto$1.invalidDate     = invalidDate;\nproto$1.ordinal         = ordinal;\nproto$1.preparse        = preParsePostFormat;\nproto$1.postformat      = preParsePostFormat;\nproto$1.relativeTime    = relativeTime;\nproto$1.pastFuture      = pastFuture;\nproto$1.set             = set;\n\n// Month\nproto$1.months            =        localeMonths;\nproto$1.monthsShort       =        localeMonthsShort;\nproto$1.monthsParse       =        localeMonthsParse;\nproto$1.monthsRegex       = monthsRegex;\nproto$1.monthsShortRegex  = monthsShortRegex;\n\n// Week\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n// Day of Week\nproto$1.weekdays       =        localeWeekdays;\nproto$1.weekdaysMin    =        localeWeekdaysMin;\nproto$1.weekdaysShort  =        localeWeekdaysShort;\nproto$1.weekdaysParse  =        localeWeekdaysParse;\n\nproto$1.weekdaysRegex       =        weekdaysRegex;\nproto$1.weekdaysShortRegex  =        weekdaysShortRegex;\nproto$1.weekdaysMinRegex    =        weekdaysMinRegex;\n\n// Hours\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1 (format, index, field, setter) {\n    var locale = getLocale();\n    var utc = createUTC().set(setter, index);\n    return locale[field](utc, format);\n}\n\nfunction listMonthsImpl (format, index, field) {\n    if (isNumber(format)) {\n        index = format;\n        format = undefined;\n    }\n\n    format = format || '';\n\n    if (index != null) {\n        return get$1(format, index, field, 'month');\n    }\n\n    var i;\n    var out = [];\n    for (i = 0; i < 12; i++) {\n        out[i] = get$1(format, i, field, 'month');\n    }\n    return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl (localeSorted, format, index, field) {\n    if (typeof localeSorted === 'boolean') {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n    } else {\n        format = localeSorted;\n        index = format;\n        localeSorted = false;\n\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n    }\n\n    var locale = getLocale(),\n        shift = localeSorted ? locale._week.dow : 0;\n\n    if (index != null) {\n        return get$1(format, (index + shift) % 7, field, 'day');\n    }\n\n    var i;\n    var out = [];\n    for (i = 0; i < 7; i++) {\n        out[i] = get$1(format, (i + shift) % 7, field, 'day');\n    }\n    return out;\n}\n\nfunction listMonths (format, index) {\n    return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort (format, index) {\n    return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays (localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort (localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin (localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n    ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (toInt(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    }\n});\n\n// Side effect imports\nhooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\nhooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\nvar mathAbs = Math.abs;\n\nfunction abs () {\n    var data           = this._data;\n\n    this._milliseconds = mathAbs(this._milliseconds);\n    this._days         = mathAbs(this._days);\n    this._months       = mathAbs(this._months);\n\n    data.milliseconds  = mathAbs(data.milliseconds);\n    data.seconds       = mathAbs(data.seconds);\n    data.minutes       = mathAbs(data.minutes);\n    data.hours         = mathAbs(data.hours);\n    data.months        = mathAbs(data.months);\n    data.years         = mathAbs(data.years);\n\n    return this;\n}\n\nfunction addSubtract$1 (duration, input, value, direction) {\n    var other = createDuration(input, value);\n\n    duration._milliseconds += direction * other._milliseconds;\n    duration._days         += direction * other._days;\n    duration._months       += direction * other._months;\n\n    return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1 (input, value) {\n    return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1 (input, value) {\n    return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil (number) {\n    if (number < 0) {\n        return Math.floor(number);\n    } else {\n        return Math.ceil(number);\n    }\n}\n\nfunction bubble () {\n    var milliseconds = this._milliseconds;\n    var days         = this._days;\n    var months       = this._months;\n    var data         = this._data;\n    var seconds, minutes, hours, years, monthsFromDays;\n\n    // if we have a mix of positive and negative values, bubble down first\n    // check: https://github.com/moment/moment/issues/2166\n    if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n            (milliseconds <= 0 && days <= 0 && months <= 0))) {\n        milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n        days = 0;\n        months = 0;\n    }\n\n    // The following code bubbles up values, see the tests for\n    // examples of what that means.\n    data.milliseconds = milliseconds % 1000;\n\n    seconds           = absFloor(milliseconds / 1000);\n    data.seconds      = seconds % 60;\n\n    minutes           = absFloor(seconds / 60);\n    data.minutes      = minutes % 60;\n\n    hours             = absFloor(minutes / 60);\n    data.hours        = hours % 24;\n\n    days += absFloor(hours / 24);\n\n    // convert days to months\n    monthsFromDays = absFloor(daysToMonths(days));\n    months += monthsFromDays;\n    days -= absCeil(monthsToDays(monthsFromDays));\n\n    // 12 months -> 1 year\n    years = absFloor(months / 12);\n    months %= 12;\n\n    data.days   = days;\n    data.months = months;\n    data.years  = years;\n\n    return this;\n}\n\nfunction daysToMonths (days) {\n    // 400 years have 146097 days (taking into account leap year rules)\n    // 400 years have 12 months === 4800\n    return days * 4800 / 146097;\n}\n\nfunction monthsToDays (months) {\n    // the reverse of daysToMonths\n    return months * 146097 / 4800;\n}\n\nfunction as (units) {\n    var days;\n    var months;\n    var milliseconds = this._milliseconds;\n\n    units = normalizeUnits(units);\n\n    if (units === 'month' || units === 'year') {\n        days   = this._days   + milliseconds / 864e5;\n        months = this._months + daysToMonths(days);\n        return units === 'month' ? months : months / 12;\n    } else {\n        // handle milliseconds separately because of floating point math errors (issue #1867)\n        days = this._days + Math.round(monthsToDays(this._months));\n        switch (units) {\n            case 'week'   : return days / 7     + milliseconds / 6048e5;\n            case 'day'    : return days         + milliseconds / 864e5;\n            case 'hour'   : return days * 24    + milliseconds / 36e5;\n            case 'minute' : return days * 1440  + milliseconds / 6e4;\n            case 'second' : return days * 86400 + milliseconds / 1000;\n            // Math.floor prevents floating point math errors here\n            case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n            default: throw new Error('Unknown unit ' + units);\n        }\n    }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1 () {\n    return (\n        this._milliseconds +\n        this._days * 864e5 +\n        (this._months % 12) * 2592e6 +\n        toInt(this._months / 12) * 31536e6\n    );\n}\n\nfunction makeAs (alias) {\n    return function () {\n        return this.as(alias);\n    };\n}\n\nvar asMilliseconds = makeAs('ms');\nvar asSeconds      = makeAs('s');\nvar asMinutes      = makeAs('m');\nvar asHours        = makeAs('h');\nvar asDays         = makeAs('d');\nvar asWeeks        = makeAs('w');\nvar asMonths       = makeAs('M');\nvar asYears        = makeAs('y');\n\nfunction get$2 (units) {\n    units = normalizeUnits(units);\n    return this[units + 's']();\n}\n\nfunction makeGetter(name) {\n    return function () {\n        return this._data[name];\n    };\n}\n\nvar milliseconds = makeGetter('milliseconds');\nvar seconds      = makeGetter('seconds');\nvar minutes      = makeGetter('minutes');\nvar hours        = makeGetter('hours');\nvar days         = makeGetter('days');\nvar months       = makeGetter('months');\nvar years        = makeGetter('years');\n\nfunction weeks () {\n    return absFloor(this.days() / 7);\n}\n\nvar round = Math.round;\nvar thresholds = {\n    s: 45,  // seconds to minute\n    m: 45,  // minutes to hour\n    h: 22,  // hours to day\n    d: 26,  // days to month\n    M: 11   // months to year\n};\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n    return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n    var duration = createDuration(posNegDuration).abs();\n    var seconds  = round(duration.as('s'));\n    var minutes  = round(duration.as('m'));\n    var hours    = round(duration.as('h'));\n    var days     = round(duration.as('d'));\n    var months   = round(duration.as('M'));\n    var years    = round(duration.as('y'));\n\n    var a = seconds < thresholds.s && ['s', seconds]  ||\n            minutes <= 1           && ['m']           ||\n            minutes < thresholds.m && ['mm', minutes] ||\n            hours   <= 1           && ['h']           ||\n            hours   < thresholds.h && ['hh', hours]   ||\n            days    <= 1           && ['d']           ||\n            days    < thresholds.d && ['dd', days]    ||\n            months  <= 1           && ['M']           ||\n            months  < thresholds.M && ['MM', months]  ||\n            years   <= 1           && ['y']           || ['yy', years];\n\n    a[2] = withoutSuffix;\n    a[3] = +posNegDuration > 0;\n    a[4] = locale;\n    return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding (roundingFunction) {\n    if (roundingFunction === undefined) {\n        return round;\n    }\n    if (typeof(roundingFunction) === 'function') {\n        round = roundingFunction;\n        return true;\n    }\n    return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold (threshold, limit) {\n    if (thresholds[threshold] === undefined) {\n        return false;\n    }\n    if (limit === undefined) {\n        return thresholds[threshold];\n    }\n    thresholds[threshold] = limit;\n    return true;\n}\n\nfunction humanize (withSuffix) {\n    var locale = this.localeData();\n    var output = relativeTime$1(this, !withSuffix, locale);\n\n    if (withSuffix) {\n        output = locale.pastFuture(+this, output);\n    }\n\n    return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction toISOString$1() {\n    // for ISO strings we do not use the normal bubbling rules:\n    //  * milliseconds bubble up until they become hours\n    //  * days do not bubble at all\n    //  * months bubble up until they become years\n    // This is because there is no context-free conversion between hours and days\n    // (think of clock changes)\n    // and also not between days and months (28-31 days per month)\n    var seconds = abs$1(this._milliseconds) / 1000;\n    var days         = abs$1(this._days);\n    var months       = abs$1(this._months);\n    var minutes, hours, years;\n\n    // 3600 seconds -> 60 minutes -> 1 hour\n    minutes           = absFloor(seconds / 60);\n    hours             = absFloor(minutes / 60);\n    seconds %= 60;\n    minutes %= 60;\n\n    // 12 months -> 1 year\n    years  = absFloor(months / 12);\n    months %= 12;\n\n\n    // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n    var Y = years;\n    var M = months;\n    var D = days;\n    var h = hours;\n    var m = minutes;\n    var s = seconds;\n    var total = this.asSeconds();\n\n    if (!total) {\n        // this is the same as C#'s (Noda) and python (isodate)...\n        // but not other JS (goog.date)\n        return 'P0D';\n    }\n\n    return (total < 0 ? '-' : '') +\n        'P' +\n        (Y ? Y + 'Y' : '') +\n        (M ? M + 'M' : '') +\n        (D ? D + 'D' : '') +\n        ((h || m || s) ? 'T' : '') +\n        (h ? h + 'H' : '') +\n        (m ? m + 'M' : '') +\n        (s ? s + 'S' : '');\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.abs            = abs;\nproto$2.add            = add$1;\nproto$2.subtract       = subtract$1;\nproto$2.as             = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds      = asSeconds;\nproto$2.asMinutes      = asMinutes;\nproto$2.asHours        = asHours;\nproto$2.asDays         = asDays;\nproto$2.asWeeks        = asWeeks;\nproto$2.asMonths       = asMonths;\nproto$2.asYears        = asYears;\nproto$2.valueOf        = valueOf$1;\nproto$2._bubble        = bubble;\nproto$2.get            = get$2;\nproto$2.milliseconds   = milliseconds;\nproto$2.seconds        = seconds;\nproto$2.minutes        = minutes;\nproto$2.hours          = hours;\nproto$2.days           = days;\nproto$2.weeks          = weeks;\nproto$2.months         = months;\nproto$2.years          = years;\nproto$2.humanize       = humanize;\nproto$2.toISOString    = toISOString$1;\nproto$2.toString       = toISOString$1;\nproto$2.toJSON         = toISOString$1;\nproto$2.locale         = locale;\nproto$2.localeData     = localeData;\n\n// Deprecations\nproto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\nproto$2.lang = lang;\n\n// Side effect imports\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n    config._d = new Date(parseFloat(input, 10) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n    config._d = new Date(toInt(input));\n});\n\n// Side effect imports\n\n//! moment.js\n//! version : 2.17.0\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nhooks.version = '2.17.0';\n\nsetHookCallback(createLocal);\n\nhooks.fn                    = proto;\nhooks.min                   = min;\nhooks.max                   = max;\nhooks.now                   = now;\nhooks.utc                   = createUTC;\nhooks.unix                  = createUnix;\nhooks.months                = listMonths;\nhooks.isDate                = isDate;\nhooks.locale                = getSetGlobalLocale;\nhooks.invalid               = createInvalid;\nhooks.duration              = createDuration;\nhooks.isMoment              = isMoment;\nhooks.weekdays              = listWeekdays;\nhooks.parseZone             = createInZone;\nhooks.localeData            = getLocale;\nhooks.isDuration            = isDuration;\nhooks.monthsShort           = listMonthsShort;\nhooks.weekdaysMin           = listWeekdaysMin;\nhooks.defineLocale          = defineLocale;\nhooks.updateLocale          = updateLocale;\nhooks.locales               = listLocales;\nhooks.weekdaysShort         = listWeekdaysShort;\nhooks.normalizeUnits        = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat        = getCalendarFormat;\nhooks.prototype             = proto;\n\n//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\nhooks.defineLocale('af', {\n    months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),\n    monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n    weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),\n    weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n    weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n    meridiemParse: /vm|nm/i,\n    isPM : function (input) {\n        return /^nm$/i.test(input);\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 12) {\n            return isLower ? 'vm' : 'VM';\n        } else {\n            return isLower ? 'nm' : 'NM';\n        }\n    },\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[Vandag om] LT',\n        nextDay : '[Môre om] LT',\n        nextWeek : 'dddd [om] LT',\n        lastDay : '[Gister om] LT',\n        lastWeek : '[Laas] dddd [om] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'oor %s',\n        past : '%s gelede',\n        s : '\\'n paar sekondes',\n        m : '\\'n minuut',\n        mm : '%d minute',\n        h : '\\'n uur',\n        hh : '%d ure',\n        d : '\\'n dag',\n        dd : '%d dae',\n        M : '\\'n maand',\n        MM : '%d maande',\n        y : '\\'n jaar',\n        yy : '%d jaar'\n    },\n    ordinalParse: /\\d{1,2}(ste|de)/,\n    ordinal : function (number) {\n        return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter\n    },\n    week : {\n        dow : 1, // Maandag is die eerste dag van die week.\n        doy : 4  // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddineme\n\nhooks.defineLocale('ar-dz', {\n    months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n    monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n    weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n    weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n    weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[اليوم على الساعة] LT',\n        nextDay: '[غدا على الساعة] LT',\n        nextWeek: 'dddd [على الساعة] LT',\n        lastDay: '[أمس على الساعة] LT',\n        lastWeek: 'dddd [على الساعة] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'في %s',\n        past : 'منذ %s',\n        s : 'ثوان',\n        m : 'دقيقة',\n        mm : '%d دقائق',\n        h : 'ساعة',\n        hh : '%d ساعات',\n        d : 'يوم',\n        dd : '%d أيام',\n        M : 'شهر',\n        MM : '%d أشهر',\n        y : 'سنة',\n        yy : '%d سنوات'\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 4  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Arabic (Lybia) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\nvar symbolMap = {\n    '1': '1',\n    '2': '2',\n    '3': '3',\n    '4': '4',\n    '5': '5',\n    '6': '6',\n    '7': '7',\n    '8': '8',\n    '9': '9',\n    '0': '0'\n};\nvar pluralForm = function (n) {\n    return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n};\nvar plurals = {\n    s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n    m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n    h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n    d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n    M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n    y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n};\nvar pluralize = function (u) {\n    return function (number, withoutSuffix, string, isFuture) {\n        var f = pluralForm(number),\n            str = plurals[u][pluralForm(number)];\n        if (f === 2) {\n            str = str[withoutSuffix ? 0 : 1];\n        }\n        return str.replace(/%d/i, number);\n    };\n};\nvar months$1 = [\n    'يناير',\n    'فبراير',\n    'مارس',\n    'أبريل',\n    'مايو',\n    'يونيو',\n    'يوليو',\n    'أغسطس',\n    'سبتمبر',\n    'أكتوبر',\n    'نوفمبر',\n    'ديسمبر'\n];\n\nhooks.defineLocale('ar-ly', {\n    months : months$1,\n    monthsShort : months$1,\n    weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n    weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n    weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'D/\\u200FM/\\u200FYYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    meridiemParse: /ص|م/,\n    isPM : function (input) {\n        return 'م' === input;\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return 'ص';\n        } else {\n            return 'م';\n        }\n    },\n    calendar : {\n        sameDay: '[اليوم عند الساعة] LT',\n        nextDay: '[غدًا عند الساعة] LT',\n        nextWeek: 'dddd [عند الساعة] LT',\n        lastDay: '[أمس عند الساعة] LT',\n        lastWeek: 'dddd [عند الساعة] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'بعد %s',\n        past : 'منذ %s',\n        s : pluralize('s'),\n        m : pluralize('m'),\n        mm : pluralize('m'),\n        h : pluralize('h'),\n        hh : pluralize('h'),\n        d : pluralize('d'),\n        dd : pluralize('d'),\n        M : pluralize('M'),\n        MM : pluralize('M'),\n        y : pluralize('y'),\n        yy : pluralize('y')\n    },\n    preparse: function (string) {\n        return string.replace(/\\u200f/g, '').replace(/،/g, ',');\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap[match];\n        }).replace(/,/g, '،');\n    },\n    week : {\n        dow : 6, // Saturday is the first day of the week.\n        doy : 12  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\nhooks.defineLocale('ar-ma', {\n    months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n    monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n    weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n    weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n    weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[اليوم على الساعة] LT',\n        nextDay: '[غدا على الساعة] LT',\n        nextWeek: 'dddd [على الساعة] LT',\n        lastDay: '[أمس على الساعة] LT',\n        lastWeek: 'dddd [على الساعة] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'في %s',\n        past : 'منذ %s',\n        s : 'ثوان',\n        m : 'دقيقة',\n        mm : '%d دقائق',\n        h : 'ساعة',\n        hh : '%d ساعات',\n        d : 'يوم',\n        dd : '%d أيام',\n        M : 'شهر',\n        MM : '%d أشهر',\n        y : 'سنة',\n        yy : '%d سنوات'\n    },\n    week : {\n        dow : 6, // Saturday is the first day of the week.\n        doy : 12  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\nvar symbolMap$1 = {\n    '1': '١',\n    '2': '٢',\n    '3': '٣',\n    '4': '٤',\n    '5': '٥',\n    '6': '٦',\n    '7': '٧',\n    '8': '٨',\n    '9': '٩',\n    '0': '٠'\n};\nvar numberMap = {\n    '١': '1',\n    '٢': '2',\n    '٣': '3',\n    '٤': '4',\n    '٥': '5',\n    '٦': '6',\n    '٧': '7',\n    '٨': '8',\n    '٩': '9',\n    '٠': '0'\n};\n\nhooks.defineLocale('ar-sa', {\n    months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n    monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n    weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n    weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n    weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    meridiemParse: /ص|م/,\n    isPM : function (input) {\n        return 'م' === input;\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return 'ص';\n        } else {\n            return 'م';\n        }\n    },\n    calendar : {\n        sameDay: '[اليوم على الساعة] LT',\n        nextDay: '[غدا على الساعة] LT',\n        nextWeek: 'dddd [على الساعة] LT',\n        lastDay: '[أمس على الساعة] LT',\n        lastWeek: 'dddd [على الساعة] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'في %s',\n        past : 'منذ %s',\n        s : 'ثوان',\n        m : 'دقيقة',\n        mm : '%d دقائق',\n        h : 'ساعة',\n        hh : '%d ساعات',\n        d : 'يوم',\n        dd : '%d أيام',\n        M : 'شهر',\n        MM : '%d أشهر',\n        y : 'سنة',\n        yy : '%d سنوات'\n    },\n    preparse: function (string) {\n        return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n            return numberMap[match];\n        }).replace(/،/g, ',');\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$1[match];\n        }).replace(/,/g, '،');\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale  :  Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\nhooks.defineLocale('ar-tn', {\n    months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n    monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n    weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n    weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n    weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat: {\n        LT: 'HH:mm',\n        LTS: 'HH:mm:ss',\n        L: 'DD/MM/YYYY',\n        LL: 'D MMMM YYYY',\n        LLL: 'D MMMM YYYY HH:mm',\n        LLLL: 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar: {\n        sameDay: '[اليوم على الساعة] LT',\n        nextDay: '[غدا على الساعة] LT',\n        nextWeek: 'dddd [على الساعة] LT',\n        lastDay: '[أمس على الساعة] LT',\n        lastWeek: 'dddd [على الساعة] LT',\n        sameElse: 'L'\n    },\n    relativeTime: {\n        future: 'في %s',\n        past: 'منذ %s',\n        s: 'ثوان',\n        m: 'دقيقة',\n        mm: '%d دقائق',\n        h: 'ساعة',\n        hh: '%d ساعات',\n        d: 'يوم',\n        dd: '%d أيام',\n        M: 'شهر',\n        MM: '%d أشهر',\n        y: 'سنة',\n        yy: '%d سنوات'\n    },\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4 // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\nvar symbolMap$2 = {\n    '1': '١',\n    '2': '٢',\n    '3': '٣',\n    '4': '٤',\n    '5': '٥',\n    '6': '٦',\n    '7': '٧',\n    '8': '٨',\n    '9': '٩',\n    '0': '٠'\n};\nvar numberMap$1 = {\n    '١': '1',\n    '٢': '2',\n    '٣': '3',\n    '٤': '4',\n    '٥': '5',\n    '٦': '6',\n    '٧': '7',\n    '٨': '8',\n    '٩': '9',\n    '٠': '0'\n};\nvar pluralForm$1 = function (n) {\n    return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n};\nvar plurals$1 = {\n    s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n    m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n    h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n    d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n    M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n    y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n};\nvar pluralize$1 = function (u) {\n    return function (number, withoutSuffix, string, isFuture) {\n        var f = pluralForm$1(number),\n            str = plurals$1[u][pluralForm$1(number)];\n        if (f === 2) {\n            str = str[withoutSuffix ? 0 : 1];\n        }\n        return str.replace(/%d/i, number);\n    };\n};\nvar months$2 = [\n    'كانون الثاني يناير',\n    'شباط فبراير',\n    'آذار مارس',\n    'نيسان أبريل',\n    'أيار مايو',\n    'حزيران يونيو',\n    'تموز يوليو',\n    'آب أغسطس',\n    'أيلول سبتمبر',\n    'تشرين الأول أكتوبر',\n    'تشرين الثاني نوفمبر',\n    'كانون الأول ديسمبر'\n];\n\nhooks.defineLocale('ar', {\n    months : months$2,\n    monthsShort : months$2,\n    weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n    weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n    weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'D/\\u200FM/\\u200FYYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    meridiemParse: /ص|م/,\n    isPM : function (input) {\n        return 'م' === input;\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return 'ص';\n        } else {\n            return 'م';\n        }\n    },\n    calendar : {\n        sameDay: '[اليوم عند الساعة] LT',\n        nextDay: '[غدًا عند الساعة] LT',\n        nextWeek: 'dddd [عند الساعة] LT',\n        lastDay: '[أمس عند الساعة] LT',\n        lastWeek: 'dddd [عند الساعة] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'بعد %s',\n        past : 'منذ %s',\n        s : pluralize$1('s'),\n        m : pluralize$1('m'),\n        mm : pluralize$1('m'),\n        h : pluralize$1('h'),\n        hh : pluralize$1('h'),\n        d : pluralize$1('d'),\n        dd : pluralize$1('d'),\n        M : pluralize$1('M'),\n        MM : pluralize$1('M'),\n        y : pluralize$1('y'),\n        yy : pluralize$1('y')\n    },\n    preparse: function (string) {\n        return string.replace(/\\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n            return numberMap$1[match];\n        }).replace(/،/g, ',');\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$2[match];\n        }).replace(/,/g, '،');\n    },\n    week : {\n        dow : 6, // Saturday is the first day of the week.\n        doy : 12  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\nvar suffixes = {\n    1: '-inci',\n    5: '-inci',\n    8: '-inci',\n    70: '-inci',\n    80: '-inci',\n    2: '-nci',\n    7: '-nci',\n    20: '-nci',\n    50: '-nci',\n    3: '-üncü',\n    4: '-üncü',\n    100: '-üncü',\n    6: '-ncı',\n    9: '-uncu',\n    10: '-uncu',\n    30: '-uncu',\n    60: '-ıncı',\n    90: '-ıncı'\n};\n\nhooks.defineLocale('az', {\n    months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),\n    monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n    weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),\n    weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n    weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[bugün saat] LT',\n        nextDay : '[sabah saat] LT',\n        nextWeek : '[gələn həftə] dddd [saat] LT',\n        lastDay : '[dünən] LT',\n        lastWeek : '[keçən həftə] dddd [saat] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s sonra',\n        past : '%s əvvəl',\n        s : 'birneçə saniyyə',\n        m : 'bir dəqiqə',\n        mm : '%d dəqiqə',\n        h : 'bir saat',\n        hh : '%d saat',\n        d : 'bir gün',\n        dd : '%d gün',\n        M : 'bir ay',\n        MM : '%d ay',\n        y : 'bir il',\n        yy : '%d il'\n    },\n    meridiemParse: /gecə|səhər|gündüz|axşam/,\n    isPM : function (input) {\n        return /^(gündüz|axşam)$/.test(input);\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'gecə';\n        } else if (hour < 12) {\n            return 'səhər';\n        } else if (hour < 17) {\n            return 'gündüz';\n        } else {\n            return 'axşam';\n        }\n    },\n    ordinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n    ordinal : function (number) {\n        if (number === 0) {  // special case for zero\n            return number + '-ıncı';\n        }\n        var a = number % 10,\n            b = number % 100 - a,\n            c = number >= 100 ? 100 : null;\n        return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\nfunction plural(word, num) {\n    var forms = word.split('_');\n    return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n}\nfunction relativeTimeWithPlural(number, withoutSuffix, key) {\n    var format = {\n        'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n        'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n        'dd': 'дзень_дні_дзён',\n        'MM': 'месяц_месяцы_месяцаў',\n        'yy': 'год_гады_гадоў'\n    };\n    if (key === 'm') {\n        return withoutSuffix ? 'хвіліна' : 'хвіліну';\n    }\n    else if (key === 'h') {\n        return withoutSuffix ? 'гадзіна' : 'гадзіну';\n    }\n    else {\n        return number + ' ' + plural(format[key], +number);\n    }\n}\n\nhooks.defineLocale('be', {\n    months : {\n        format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),\n        standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')\n    },\n    monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n    weekdays : {\n        format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),\n        standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),\n        isFormat: /\\[ ?[Вв] ?(?:мінулую|наступную)? ?\\] ?dddd/\n    },\n    weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n    weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY г.',\n        LLL : 'D MMMM YYYY г., HH:mm',\n        LLLL : 'dddd, D MMMM YYYY г., HH:mm'\n    },\n    calendar : {\n        sameDay: '[Сёння ў] LT',\n        nextDay: '[Заўтра ў] LT',\n        lastDay: '[Учора ў] LT',\n        nextWeek: function () {\n            return '[У] dddd [ў] LT';\n        },\n        lastWeek: function () {\n            switch (this.day()) {\n                case 0:\n                case 3:\n                case 5:\n                case 6:\n                    return '[У мінулую] dddd [ў] LT';\n                case 1:\n                case 2:\n                case 4:\n                    return '[У мінулы] dddd [ў] LT';\n            }\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'праз %s',\n        past : '%s таму',\n        s : 'некалькі секунд',\n        m : relativeTimeWithPlural,\n        mm : relativeTimeWithPlural,\n        h : relativeTimeWithPlural,\n        hh : relativeTimeWithPlural,\n        d : 'дзень',\n        dd : relativeTimeWithPlural,\n        M : 'месяц',\n        MM : relativeTimeWithPlural,\n        y : 'год',\n        yy : relativeTimeWithPlural\n    },\n    meridiemParse: /ночы|раніцы|дня|вечара/,\n    isPM : function (input) {\n        return /^(дня|вечара)$/.test(input);\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'ночы';\n        } else if (hour < 12) {\n            return 'раніцы';\n        } else if (hour < 17) {\n            return 'дня';\n        } else {\n            return 'вечара';\n        }\n    },\n    ordinalParse: /\\d{1,2}-(і|ы|га)/,\n    ordinal: function (number, period) {\n        switch (period) {\n            case 'M':\n            case 'd':\n            case 'DDD':\n            case 'w':\n            case 'W':\n                return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы';\n            case 'D':\n                return number + '-га';\n            default:\n                return number;\n        }\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\nhooks.defineLocale('bg-x', {\n    parentLocale: 'bg'\n});\n\n//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\nhooks.defineLocale('bg', {\n    months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),\n    monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n    weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),\n    weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n    weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'D.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY H:mm',\n        LLLL : 'dddd, D MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay : '[Днес в] LT',\n        nextDay : '[Утре в] LT',\n        nextWeek : 'dddd [в] LT',\n        lastDay : '[Вчера в] LT',\n        lastWeek : function () {\n            switch (this.day()) {\n                case 0:\n                case 3:\n                case 6:\n                    return '[В изминалата] dddd [в] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[В изминалия] dddd [в] LT';\n            }\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'след %s',\n        past : 'преди %s',\n        s : 'няколко секунди',\n        m : 'минута',\n        mm : '%d минути',\n        h : 'час',\n        hh : '%d часа',\n        d : 'ден',\n        dd : '%d дни',\n        M : 'месец',\n        MM : '%d месеца',\n        y : 'година',\n        yy : '%d години'\n    },\n    ordinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n    ordinal : function (number) {\n        var lastDigit = number % 10,\n            last2Digits = number % 100;\n        if (number === 0) {\n            return number + '-ев';\n        } else if (last2Digits === 0) {\n            return number + '-ен';\n        } else if (last2Digits > 10 && last2Digits < 20) {\n            return number + '-ти';\n        } else if (lastDigit === 1) {\n            return number + '-ви';\n        } else if (lastDigit === 2) {\n            return number + '-ри';\n        } else if (lastDigit === 7 || lastDigit === 8) {\n            return number + '-ми';\n        } else {\n            return number + '-ти';\n        }\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\nvar symbolMap$3 = {\n    '1': '১',\n    '2': '২',\n    '3': '৩',\n    '4': '৪',\n    '5': '৫',\n    '6': '৬',\n    '7': '৭',\n    '8': '৮',\n    '9': '৯',\n    '0': '০'\n};\nvar numberMap$2 = {\n    '১': '1',\n    '২': '2',\n    '৩': '3',\n    '৪': '4',\n    '৫': '5',\n    '৬': '6',\n    '৭': '7',\n    '৮': '8',\n    '৯': '9',\n    '০': '0'\n};\n\nhooks.defineLocale('bn', {\n    months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n    monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n    weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n    weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n    weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),\n    longDateFormat : {\n        LT : 'A h:mm সময়',\n        LTS : 'A h:mm:ss সময়',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, A h:mm সময়',\n        LLLL : 'dddd, D MMMM YYYY, A h:mm সময়'\n    },\n    calendar : {\n        sameDay : '[আজ] LT',\n        nextDay : '[আগামীকাল] LT',\n        nextWeek : 'dddd, LT',\n        lastDay : '[গতকাল] LT',\n        lastWeek : '[গত] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s পরে',\n        past : '%s আগে',\n        s : 'কয়েক সেকেন্ড',\n        m : 'এক মিনিট',\n        mm : '%d মিনিট',\n        h : 'এক ঘন্টা',\n        hh : '%d ঘন্টা',\n        d : 'এক দিন',\n        dd : '%d দিন',\n        M : 'এক মাস',\n        MM : '%d মাস',\n        y : 'এক বছর',\n        yy : '%d বছর'\n    },\n    preparse: function (string) {\n        return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n            return numberMap$2[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$3[match];\n        });\n    },\n    meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if ((meridiem === 'রাত' && hour >= 4) ||\n                (meridiem === 'দুপুর' && hour < 5) ||\n                meridiem === 'বিকাল') {\n            return hour + 12;\n        } else {\n            return hour;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'রাত';\n        } else if (hour < 10) {\n            return 'সকাল';\n        } else if (hour < 17) {\n            return 'দুপুর';\n        } else if (hour < 20) {\n            return 'বিকাল';\n        } else {\n            return 'রাত';\n        }\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\nvar symbolMap$4 = {\n    '1': '༡',\n    '2': '༢',\n    '3': '༣',\n    '4': '༤',\n    '5': '༥',\n    '6': '༦',\n    '7': '༧',\n    '8': '༨',\n    '9': '༩',\n    '0': '༠'\n};\nvar numberMap$3 = {\n    '༡': '1',\n    '༢': '2',\n    '༣': '3',\n    '༤': '4',\n    '༥': '5',\n    '༦': '6',\n    '༧': '7',\n    '༨': '8',\n    '༩': '9',\n    '༠': '0'\n};\n\nhooks.defineLocale('bo', {\n    months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n    monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n    weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),\n    weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n    weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n    longDateFormat : {\n        LT : 'A h:mm',\n        LTS : 'A h:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, A h:mm',\n        LLLL : 'dddd, D MMMM YYYY, A h:mm'\n    },\n    calendar : {\n        sameDay : '[དི་རིང] LT',\n        nextDay : '[སང་ཉིན] LT',\n        nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT',\n        lastDay : '[ཁ་སང] LT',\n        lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s ལ་',\n        past : '%s སྔན་ལ',\n        s : 'ལམ་སང',\n        m : 'སྐར་མ་གཅིག',\n        mm : '%d སྐར་མ',\n        h : 'ཆུ་ཚོད་གཅིག',\n        hh : '%d ཆུ་ཚོད',\n        d : 'ཉིན་གཅིག',\n        dd : '%d ཉིན་',\n        M : 'ཟླ་བ་གཅིག',\n        MM : '%d ཟླ་བ',\n        y : 'ལོ་གཅིག',\n        yy : '%d ལོ'\n    },\n    preparse: function (string) {\n        return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n            return numberMap$3[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$4[match];\n        });\n    },\n    meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if ((meridiem === 'མཚན་མོ' && hour >= 4) ||\n                (meridiem === 'ཉིན་གུང' && hour < 5) ||\n                meridiem === 'དགོང་དག') {\n            return hour + 12;\n        } else {\n            return hour;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'མཚན་མོ';\n        } else if (hour < 10) {\n            return 'ཞོགས་ཀས';\n        } else if (hour < 17) {\n            return 'ཉིན་གུང';\n        } else if (hour < 20) {\n            return 'དགོང་དག';\n        } else {\n            return 'མཚན་མོ';\n        }\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\nfunction relativeTimeWithMutation(number, withoutSuffix, key) {\n    var format = {\n        'mm': 'munutenn',\n        'MM': 'miz',\n        'dd': 'devezh'\n    };\n    return number + ' ' + mutation(format[key], number);\n}\nfunction specialMutationForYears(number) {\n    switch (lastNumber(number)) {\n        case 1:\n        case 3:\n        case 4:\n        case 5:\n        case 9:\n            return number + ' bloaz';\n        default:\n            return number + ' vloaz';\n    }\n}\nfunction lastNumber(number) {\n    if (number > 9) {\n        return lastNumber(number % 10);\n    }\n    return number;\n}\nfunction mutation(text, number) {\n    if (number === 2) {\n        return softMutation(text);\n    }\n    return text;\n}\nfunction softMutation(text) {\n    var mutationTable = {\n        'm': 'v',\n        'b': 'v',\n        'd': 'z'\n    };\n    if (mutationTable[text.charAt(0)] === undefined) {\n        return text;\n    }\n    return mutationTable[text.charAt(0)] + text.substring(1);\n}\n\nhooks.defineLocale('br', {\n    months : 'Genver_C\\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),\n    monthsShort : 'Gen_C\\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n    weekdays : 'Sul_Lun_Meurzh_Merc\\'her_Yaou_Gwener_Sadorn'.split('_'),\n    weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n    weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'h[e]mm A',\n        LTS : 'h[e]mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D [a viz] MMMM YYYY',\n        LLL : 'D [a viz] MMMM YYYY h[e]mm A',\n        LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A'\n    },\n    calendar : {\n        sameDay : '[Hiziv da] LT',\n        nextDay : '[Warc\\'hoazh da] LT',\n        nextWeek : 'dddd [da] LT',\n        lastDay : '[Dec\\'h da] LT',\n        lastWeek : 'dddd [paset da] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'a-benn %s',\n        past : '%s \\'zo',\n        s : 'un nebeud segondennoù',\n        m : 'ur vunutenn',\n        mm : relativeTimeWithMutation,\n        h : 'un eur',\n        hh : '%d eur',\n        d : 'un devezh',\n        dd : relativeTimeWithMutation,\n        M : 'ur miz',\n        MM : relativeTimeWithMutation,\n        y : 'ur bloaz',\n        yy : specialMutationForYears\n    },\n    ordinalParse: /\\d{1,2}(añ|vet)/,\n    ordinal : function (number) {\n        var output = (number === 1) ? 'añ' : 'vet';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n\nfunction translate(number, withoutSuffix, key) {\n    var result = number + ' ';\n    switch (key) {\n        case 'm':\n            return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n        case 'mm':\n            if (number === 1) {\n                result += 'minuta';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'minute';\n            } else {\n                result += 'minuta';\n            }\n            return result;\n        case 'h':\n            return withoutSuffix ? 'jedan sat' : 'jednog sata';\n        case 'hh':\n            if (number === 1) {\n                result += 'sat';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'sata';\n            } else {\n                result += 'sati';\n            }\n            return result;\n        case 'dd':\n            if (number === 1) {\n                result += 'dan';\n            } else {\n                result += 'dana';\n            }\n            return result;\n        case 'MM':\n            if (number === 1) {\n                result += 'mjesec';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'mjeseca';\n            } else {\n                result += 'mjeseci';\n            }\n            return result;\n        case 'yy':\n            if (number === 1) {\n                result += 'godina';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'godine';\n            } else {\n                result += 'godina';\n            }\n            return result;\n    }\n}\n\nhooks.defineLocale('bs', {\n    months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),\n    monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n    monthsParseExact: true,\n    weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n    weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n    weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY H:mm',\n        LLLL : 'dddd, D. MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay  : '[danas u] LT',\n        nextDay  : '[sutra u] LT',\n        nextWeek : function () {\n            switch (this.day()) {\n                case 0:\n                    return '[u] [nedjelju] [u] LT';\n                case 3:\n                    return '[u] [srijedu] [u] LT';\n                case 6:\n                    return '[u] [subotu] [u] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[u] dddd [u] LT';\n            }\n        },\n        lastDay  : '[jučer u] LT',\n        lastWeek : function () {\n            switch (this.day()) {\n                case 0:\n                case 3:\n                    return '[prošlu] dddd [u] LT';\n                case 6:\n                    return '[prošle] [subote] [u] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[prošli] dddd [u] LT';\n            }\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'za %s',\n        past   : 'prije %s',\n        s      : 'par sekundi',\n        m      : translate,\n        mm     : translate,\n        h      : translate,\n        hh     : translate,\n        d      : 'dan',\n        dd     : translate,\n        M      : 'mjesec',\n        MM     : translate,\n        y      : 'godinu',\n        yy     : translate\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\nhooks.defineLocale('ca', {\n    months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),\n    monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),\n    weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n    weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY H:mm',\n        LLLL : 'dddd D MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay : function () {\n            return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n        },\n        nextDay : function () {\n            return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n        },\n        nextWeek : function () {\n            return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n        },\n        lastDay : function () {\n            return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n        },\n        lastWeek : function () {\n            return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'd\\'aquí %s',\n        past : 'fa %s',\n        s : 'uns segons',\n        m : 'un minut',\n        mm : '%d minuts',\n        h : 'una hora',\n        hh : '%d hores',\n        d : 'un dia',\n        dd : '%d dies',\n        M : 'un mes',\n        MM : '%d mesos',\n        y : 'un any',\n        yy : '%d anys'\n    },\n    ordinalParse: /\\d{1,2}(r|n|t|è|a)/,\n    ordinal : function (number, period) {\n        var output = (number === 1) ? 'r' :\n            (number === 2) ? 'n' :\n            (number === 3) ? 'r' :\n            (number === 4) ? 't' : 'è';\n        if (period === 'w' || period === 'W') {\n            output = 'a';\n        }\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\nvar months$3 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');\nvar monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');\nfunction plural$1(n) {\n    return (n > 1) && (n < 5) && (~~(n / 10) !== 1);\n}\nfunction translate$1(number, withoutSuffix, key, isFuture) {\n    var result = number + ' ';\n    switch (key) {\n        case 's':  // a few seconds / in a few seconds / a few seconds ago\n            return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';\n        case 'm':  // a minute / in a minute / a minute ago\n            return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');\n        case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$1(number) ? 'minuty' : 'minut');\n            } else {\n                return result + 'minutami';\n            }\n            break;\n        case 'h':  // an hour / in an hour / an hour ago\n            return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n        case 'hh': // 9 hours / in 9 hours / 9 hours ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$1(number) ? 'hodiny' : 'hodin');\n            } else {\n                return result + 'hodinami';\n            }\n            break;\n        case 'd':  // a day / in a day / a day ago\n            return (withoutSuffix || isFuture) ? 'den' : 'dnem';\n        case 'dd': // 9 days / in 9 days / 9 days ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$1(number) ? 'dny' : 'dní');\n            } else {\n                return result + 'dny';\n            }\n            break;\n        case 'M':  // a month / in a month / a month ago\n            return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';\n        case 'MM': // 9 months / in 9 months / 9 months ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$1(number) ? 'měsíce' : 'měsíců');\n            } else {\n                return result + 'měsíci';\n            }\n            break;\n        case 'y':  // a year / in a year / a year ago\n            return (withoutSuffix || isFuture) ? 'rok' : 'rokem';\n        case 'yy': // 9 years / in 9 years / 9 years ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$1(number) ? 'roky' : 'let');\n            } else {\n                return result + 'lety';\n            }\n            break;\n    }\n}\n\nhooks.defineLocale('cs', {\n    months : months$3,\n    monthsShort : monthsShort,\n    monthsParse : (function (months, monthsShort) {\n        var i, _monthsParse = [];\n        for (i = 0; i < 12; i++) {\n            // use custom parser to solve problem with July (červenec)\n            _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');\n        }\n        return _monthsParse;\n    }(months$3, monthsShort)),\n    shortMonthsParse : (function (monthsShort) {\n        var i, _shortMonthsParse = [];\n        for (i = 0; i < 12; i++) {\n            _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');\n        }\n        return _shortMonthsParse;\n    }(monthsShort)),\n    longMonthsParse : (function (months) {\n        var i, _longMonthsParse = [];\n        for (i = 0; i < 12; i++) {\n            _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');\n        }\n        return _longMonthsParse;\n    }(months$3)),\n    weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n    weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),\n    weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),\n    longDateFormat : {\n        LT: 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY H:mm',\n        LLLL : 'dddd D. MMMM YYYY H:mm',\n        l : 'D. M. YYYY'\n    },\n    calendar : {\n        sameDay: '[dnes v] LT',\n        nextDay: '[zítra v] LT',\n        nextWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[v neděli v] LT';\n                case 1:\n                case 2:\n                    return '[v] dddd [v] LT';\n                case 3:\n                    return '[ve středu v] LT';\n                case 4:\n                    return '[ve čtvrtek v] LT';\n                case 5:\n                    return '[v pátek v] LT';\n                case 6:\n                    return '[v sobotu v] LT';\n            }\n        },\n        lastDay: '[včera v] LT',\n        lastWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[minulou neděli v] LT';\n                case 1:\n                case 2:\n                    return '[minulé] dddd [v] LT';\n                case 3:\n                    return '[minulou středu v] LT';\n                case 4:\n                case 5:\n                    return '[minulý] dddd [v] LT';\n                case 6:\n                    return '[minulou sobotu v] LT';\n            }\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'za %s',\n        past : 'před %s',\n        s : translate$1,\n        m : translate$1,\n        mm : translate$1,\n        h : translate$1,\n        hh : translate$1,\n        d : translate$1,\n        dd : translate$1,\n        M : translate$1,\n        MM : translate$1,\n        y : translate$1,\n        yy : translate$1\n    },\n    ordinalParse : /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\nhooks.defineLocale('cv', {\n    months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),\n    monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n    weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),\n    weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n    weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD-MM-YYYY',\n        LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n        LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n        LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'\n    },\n    calendar : {\n        sameDay: '[Паян] LT [сехетре]',\n        nextDay: '[Ыран] LT [сехетре]',\n        lastDay: '[Ӗнер] LT [сехетре]',\n        nextWeek: '[Ҫитес] dddd LT [сехетре]',\n        lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : function (output) {\n            var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';\n            return output + affix;\n        },\n        past : '%s каялла',\n        s : 'пӗр-ик ҫеккунт',\n        m : 'пӗр минут',\n        mm : '%d минут',\n        h : 'пӗр сехет',\n        hh : '%d сехет',\n        d : 'пӗр кун',\n        dd : '%d кун',\n        M : 'пӗр уйӑх',\n        MM : '%d уйӑх',\n        y : 'пӗр ҫул',\n        yy : '%d ҫул'\n    },\n    ordinalParse: /\\d{1,2}-мӗш/,\n    ordinal : '%d-мӗш',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\nhooks.defineLocale('cy', {\n    months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),\n    monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),\n    weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),\n    weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n    weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n    weekdaysParseExact : true,\n    // time formats are the same as en-gb\n    longDateFormat: {\n        LT: 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L: 'DD/MM/YYYY',\n        LL: 'D MMMM YYYY',\n        LLL: 'D MMMM YYYY HH:mm',\n        LLLL: 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar: {\n        sameDay: '[Heddiw am] LT',\n        nextDay: '[Yfory am] LT',\n        nextWeek: 'dddd [am] LT',\n        lastDay: '[Ddoe am] LT',\n        lastWeek: 'dddd [diwethaf am] LT',\n        sameElse: 'L'\n    },\n    relativeTime: {\n        future: 'mewn %s',\n        past: '%s yn ôl',\n        s: 'ychydig eiliadau',\n        m: 'munud',\n        mm: '%d munud',\n        h: 'awr',\n        hh: '%d awr',\n        d: 'diwrnod',\n        dd: '%d diwrnod',\n        M: 'mis',\n        MM: '%d mis',\n        y: 'blwyddyn',\n        yy: '%d flynedd'\n    },\n    ordinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n    // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n    ordinal: function (number) {\n        var b = number,\n            output = '',\n            lookup = [\n                '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed\n                'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed\n            ];\n        if (b > 20) {\n            if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n                output = 'fed'; // not 30ain, 70ain or 90ain\n            } else {\n                output = 'ain';\n            }\n        } else if (b > 0) {\n            output = lookup[b];\n        }\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\nhooks.defineLocale('da', {\n    months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),\n    monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n    weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n    weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n    weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY HH:mm',\n        LLLL : 'dddd [d.] D. MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[I dag kl.] LT',\n        nextDay : '[I morgen kl.] LT',\n        nextWeek : 'dddd [kl.] LT',\n        lastDay : '[I går kl.] LT',\n        lastWeek : '[sidste] dddd [kl] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'om %s',\n        past : '%s siden',\n        s : 'få sekunder',\n        m : 'et minut',\n        mm : '%d minutter',\n        h : 'en time',\n        hh : '%d timer',\n        d : 'en dag',\n        dd : '%d dage',\n        M : 'en måned',\n        MM : '%d måneder',\n        y : 'et år',\n        yy : '%d år'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\nfunction processRelativeTime(number, withoutSuffix, key, isFuture) {\n    var format = {\n        'm': ['eine Minute', 'einer Minute'],\n        'h': ['eine Stunde', 'einer Stunde'],\n        'd': ['ein Tag', 'einem Tag'],\n        'dd': [number + ' Tage', number + ' Tagen'],\n        'M': ['ein Monat', 'einem Monat'],\n        'MM': [number + ' Monate', number + ' Monaten'],\n        'y': ['ein Jahr', 'einem Jahr'],\n        'yy': [number + ' Jahre', number + ' Jahren']\n    };\n    return withoutSuffix ? format[key][0] : format[key][1];\n}\n\nhooks.defineLocale('de-at', {\n    months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n    monthsShort : 'Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n    weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n    weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT: 'HH:mm',\n        LTS: 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY HH:mm',\n        LLLL : 'dddd, D. MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[heute um] LT [Uhr]',\n        sameElse: 'L',\n        nextDay: '[morgen um] LT [Uhr]',\n        nextWeek: 'dddd [um] LT [Uhr]',\n        lastDay: '[gestern um] LT [Uhr]',\n        lastWeek: '[letzten] dddd [um] LT [Uhr]'\n    },\n    relativeTime : {\n        future : 'in %s',\n        past : 'vor %s',\n        s : 'ein paar Sekunden',\n        m : processRelativeTime,\n        mm : '%d Minuten',\n        h : processRelativeTime,\n        hh : '%d Stunden',\n        d : processRelativeTime,\n        dd : processRelativeTime,\n        M : processRelativeTime,\n        MM : processRelativeTime,\n        y : processRelativeTime,\n        yy : processRelativeTime\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\nfunction processRelativeTime$1(number, withoutSuffix, key, isFuture) {\n    var format = {\n        'm': ['eine Minute', 'einer Minute'],\n        'h': ['eine Stunde', 'einer Stunde'],\n        'd': ['ein Tag', 'einem Tag'],\n        'dd': [number + ' Tage', number + ' Tagen'],\n        'M': ['ein Monat', 'einem Monat'],\n        'MM': [number + ' Monate', number + ' Monaten'],\n        'y': ['ein Jahr', 'einem Jahr'],\n        'yy': [number + ' Jahre', number + ' Jahren']\n    };\n    return withoutSuffix ? format[key][0] : format[key][1];\n}\n\nhooks.defineLocale('de', {\n    months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n    monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n    weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n    weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT: 'HH:mm',\n        LTS: 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY HH:mm',\n        LLLL : 'dddd, D. MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[heute um] LT [Uhr]',\n        sameElse: 'L',\n        nextDay: '[morgen um] LT [Uhr]',\n        nextWeek: 'dddd [um] LT [Uhr]',\n        lastDay: '[gestern um] LT [Uhr]',\n        lastWeek: '[letzten] dddd [um] LT [Uhr]'\n    },\n    relativeTime : {\n        future : 'in %s',\n        past : 'vor %s',\n        s : 'ein paar Sekunden',\n        m : processRelativeTime$1,\n        mm : '%d Minuten',\n        h : processRelativeTime$1,\n        hh : '%d Stunden',\n        d : processRelativeTime$1,\n        dd : processRelativeTime$1,\n        M : processRelativeTime$1,\n        MM : processRelativeTime$1,\n        y : processRelativeTime$1,\n        yy : processRelativeTime$1\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\nvar months$4 = [\n    'ޖެނުއަރީ',\n    'ފެބްރުއަރީ',\n    'މާރިޗު',\n    'އޭޕްރީލު',\n    'މޭ',\n    'ޖޫން',\n    'ޖުލައި',\n    'އޯގަސްޓު',\n    'ސެޕްޓެމްބަރު',\n    'އޮކްޓޯބަރު',\n    'ނޮވެމްބަރު',\n    'ޑިސެމްބަރު'\n];\nvar weekdays = [\n    'އާދިއްތަ',\n    'ހޯމަ',\n    'އަންގާރަ',\n    'ބުދަ',\n    'ބުރާސްފަތި',\n    'ހުކުރު',\n    'ހޮނިހިރު'\n];\n\nhooks.defineLocale('dv', {\n    months : months$4,\n    monthsShort : months$4,\n    weekdays : weekdays,\n    weekdaysShort : weekdays,\n    weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n    longDateFormat : {\n\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'D/M/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    meridiemParse: /މކ|މފ/,\n    isPM : function (input) {\n        return 'މފ' === input;\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return 'މކ';\n        } else {\n            return 'މފ';\n        }\n    },\n    calendar : {\n        sameDay : '[މިއަދު] LT',\n        nextDay : '[މާދަމާ] LT',\n        nextWeek : 'dddd LT',\n        lastDay : '[އިއްޔެ] LT',\n        lastWeek : '[ފާއިތުވި] dddd LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'ތެރޭގައި %s',\n        past : 'ކުރިން %s',\n        s : 'ސިކުންތުކޮޅެއް',\n        m : 'މިނިޓެއް',\n        mm : 'މިނިޓު %d',\n        h : 'ގަޑިއިރެއް',\n        hh : 'ގަޑިއިރު %d',\n        d : 'ދުވަހެއް',\n        dd : 'ދުވަސް %d',\n        M : 'މަހެއް',\n        MM : 'މަސް %d',\n        y : 'އަހަރެއް',\n        yy : 'އަހަރު %d'\n    },\n    preparse: function (string) {\n        return string.replace(/،/g, ',');\n    },\n    postformat: function (string) {\n        return string.replace(/,/g, '،');\n    },\n    week : {\n        dow : 7,  // Sunday is the first day of the week.\n        doy : 12  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\nhooks.defineLocale('el', {\n    monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),\n    monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),\n    months : function (momentToFormat, format) {\n        if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'\n            return this._monthsGenitiveEl[momentToFormat.month()];\n        } else {\n            return this._monthsNominativeEl[momentToFormat.month()];\n        }\n    },\n    monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n    weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),\n    weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n    weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n    meridiem : function (hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'μμ' : 'ΜΜ';\n        } else {\n            return isLower ? 'πμ' : 'ΠΜ';\n        }\n    },\n    isPM : function (input) {\n        return ((input + '').toLowerCase()[0] === 'μ');\n    },\n    meridiemParse : /[ΠΜ]\\.?Μ?\\.?/i,\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY h:mm A',\n        LLLL : 'dddd, D MMMM YYYY h:mm A'\n    },\n    calendarEl : {\n        sameDay : '[Σήμερα {}] LT',\n        nextDay : '[Αύριο {}] LT',\n        nextWeek : 'dddd [{}] LT',\n        lastDay : '[Χθες {}] LT',\n        lastWeek : function () {\n            switch (this.day()) {\n                case 6:\n                    return '[το προηγούμενο] dddd [{}] LT';\n                default:\n                    return '[την προηγούμενη] dddd [{}] LT';\n            }\n        },\n        sameElse : 'L'\n    },\n    calendar : function (key, mom) {\n        var output = this._calendarEl[key],\n            hours = mom && mom.hours();\n        if (isFunction(output)) {\n            output = output.apply(mom);\n        }\n        return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));\n    },\n    relativeTime : {\n        future : 'σε %s',\n        past : '%s πριν',\n        s : 'λίγα δευτερόλεπτα',\n        m : 'ένα λεπτό',\n        mm : '%d λεπτά',\n        h : 'μία ώρα',\n        hh : '%d ώρες',\n        d : 'μία μέρα',\n        dd : '%d μέρες',\n        M : 'ένας μήνας',\n        MM : '%d μήνες',\n        y : 'ένας χρόνος',\n        yy : '%d χρόνια'\n    },\n    ordinalParse: /\\d{1,2}η/,\n    ordinal: '%dη',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\nhooks.defineLocale('en-au', {\n    months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n    monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n    weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n    weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n    weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY h:mm A',\n        LLLL : 'dddd, D MMMM YYYY h:mm A'\n    },\n    calendar : {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'in %s',\n        past : '%s ago',\n        s : 'a few seconds',\n        m : 'a minute',\n        mm : '%d minutes',\n        h : 'an hour',\n        hh : '%d hours',\n        d : 'a day',\n        dd : '%d days',\n        M : 'a month',\n        MM : '%d months',\n        y : 'a year',\n        yy : '%d years'\n    },\n    ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\nhooks.defineLocale('en-ca', {\n    months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n    monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n    weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n    weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n    weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'YYYY-MM-DD',\n        LL : 'MMMM D, YYYY',\n        LLL : 'MMMM D, YYYY h:mm A',\n        LLLL : 'dddd, MMMM D, YYYY h:mm A'\n    },\n    calendar : {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'in %s',\n        past : '%s ago',\n        s : 'a few seconds',\n        m : 'a minute',\n        mm : '%d minutes',\n        h : 'an hour',\n        hh : '%d hours',\n        d : 'a day',\n        dd : '%d days',\n        M : 'a month',\n        MM : '%d months',\n        y : 'a year',\n        yy : '%d years'\n    },\n    ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    }\n});\n\n//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\nhooks.defineLocale('en-gb', {\n    months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n    monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n    weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n    weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n    weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'in %s',\n        past : '%s ago',\n        s : 'a few seconds',\n        m : 'a minute',\n        mm : '%d minutes',\n        h : 'an hour',\n        hh : '%d hours',\n        d : 'a day',\n        dd : '%d days',\n        M : 'a month',\n        MM : '%d months',\n        y : 'a year',\n        yy : '%d years'\n    },\n    ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\nhooks.defineLocale('en-ie', {\n    months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n    monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n    weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n    weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n    weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD-MM-YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'in %s',\n        past : '%s ago',\n        s : 'a few seconds',\n        m : 'a minute',\n        mm : '%d minutes',\n        h : 'an hour',\n        hh : '%d hours',\n        d : 'a day',\n        dd : '%d days',\n        M : 'a month',\n        MM : '%d months',\n        y : 'a year',\n        yy : '%d years'\n    },\n    ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\nhooks.defineLocale('en-nz', {\n    months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n    monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n    weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n    weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n    weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY h:mm A',\n        LLLL : 'dddd, D MMMM YYYY h:mm A'\n    },\n    calendar : {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'in %s',\n        past : '%s ago',\n        s : 'a few seconds',\n        m : 'a minute',\n        mm : '%d minutes',\n        h : 'an hour',\n        hh : '%d hours',\n        d : 'a day',\n        dd : '%d days',\n        M : 'a month',\n        MM : '%d months',\n        y : 'a year',\n        yy : '%d years'\n    },\n    ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.\n//!          Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni!\n\nhooks.defineLocale('eo', {\n    months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),\n    monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),\n    weekdays : 'Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato'.split('_'),\n    weekdaysShort : 'Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab'.split('_'),\n    weekdaysMin : 'Di_Lu_Ma_Me_Ĵa_Ve_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'YYYY-MM-DD',\n        LL : 'D[-an de] MMMM, YYYY',\n        LLL : 'D[-an de] MMMM, YYYY HH:mm',\n        LLLL : 'dddd, [la] D[-an de] MMMM, YYYY HH:mm'\n    },\n    meridiemParse: /[ap]\\.t\\.m/i,\n    isPM: function (input) {\n        return input.charAt(0).toLowerCase() === 'p';\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'p.t.m.' : 'P.T.M.';\n        } else {\n            return isLower ? 'a.t.m.' : 'A.T.M.';\n        }\n    },\n    calendar : {\n        sameDay : '[Hodiaŭ je] LT',\n        nextDay : '[Morgaŭ je] LT',\n        nextWeek : 'dddd [je] LT',\n        lastDay : '[Hieraŭ je] LT',\n        lastWeek : '[pasinta] dddd [je] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'je %s',\n        past : 'antaŭ %s',\n        s : 'sekundoj',\n        m : 'minuto',\n        mm : '%d minutoj',\n        h : 'horo',\n        hh : '%d horoj',\n        d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo\n        dd : '%d tagoj',\n        M : 'monato',\n        MM : '%d monatoj',\n        y : 'jaro',\n        yy : '%d jaroj'\n    },\n    ordinalParse: /\\d{1,2}a/,\n    ordinal : '%da',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\nvar monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');\nvar monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\nhooks.defineLocale('es-do', {\n    months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n    monthsShort : function (m, format) {\n        if (/-MMM-/.test(format)) {\n            return monthsShort$1[m.month()];\n        } else {\n            return monthsShortDot[m.month()];\n        }\n    },\n    monthsParseExact : true,\n    weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n    weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n    weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D [de] MMMM [de] YYYY',\n        LLL : 'D [de] MMMM [de] YYYY h:mm A',\n        LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A'\n    },\n    calendar : {\n        sameDay : function () {\n            return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        nextDay : function () {\n            return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        nextWeek : function () {\n            return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        lastDay : function () {\n            return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        lastWeek : function () {\n            return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'en %s',\n        past : 'hace %s',\n        s : 'unos segundos',\n        m : 'un minuto',\n        mm : '%d minutos',\n        h : 'una hora',\n        hh : '%d horas',\n        d : 'un día',\n        dd : '%d días',\n        M : 'un mes',\n        MM : '%d meses',\n        y : 'un año',\n        yy : '%d años'\n    },\n    ordinalParse : /\\d{1,2}º/,\n    ordinal : '%dº',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\nvar monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');\nvar monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\nhooks.defineLocale('es', {\n    months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n    monthsShort : function (m, format) {\n        if (/-MMM-/.test(format)) {\n            return monthsShort$2[m.month()];\n        } else {\n            return monthsShortDot$1[m.month()];\n        }\n    },\n    monthsParseExact : true,\n    weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n    weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n    weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D [de] MMMM [de] YYYY',\n        LLL : 'D [de] MMMM [de] YYYY H:mm',\n        LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'\n    },\n    calendar : {\n        sameDay : function () {\n            return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        nextDay : function () {\n            return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        nextWeek : function () {\n            return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        lastDay : function () {\n            return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        lastWeek : function () {\n            return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'en %s',\n        past : 'hace %s',\n        s : 'unos segundos',\n        m : 'un minuto',\n        mm : '%d minutos',\n        h : 'una hora',\n        hh : '%d horas',\n        d : 'un día',\n        dd : '%d días',\n        M : 'un mes',\n        MM : '%d meses',\n        y : 'un año',\n        yy : '%d años'\n    },\n    ordinalParse : /\\d{1,2}º/,\n    ordinal : '%dº',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\nfunction processRelativeTime$2(number, withoutSuffix, key, isFuture) {\n    var format = {\n        's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n        'm' : ['ühe minuti', 'üks minut'],\n        'mm': [number + ' minuti', number + ' minutit'],\n        'h' : ['ühe tunni', 'tund aega', 'üks tund'],\n        'hh': [number + ' tunni', number + ' tundi'],\n        'd' : ['ühe päeva', 'üks päev'],\n        'M' : ['kuu aja', 'kuu aega', 'üks kuu'],\n        'MM': [number + ' kuu', number + ' kuud'],\n        'y' : ['ühe aasta', 'aasta', 'üks aasta'],\n        'yy': [number + ' aasta', number + ' aastat']\n    };\n    if (withoutSuffix) {\n        return format[key][2] ? format[key][2] : format[key][1];\n    }\n    return isFuture ? format[key][0] : format[key][1];\n}\n\nhooks.defineLocale('et', {\n    months        : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),\n    monthsShort   : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n    weekdays      : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),\n    weekdaysShort : 'P_E_T_K_N_R_L'.split('_'),\n    weekdaysMin   : 'P_E_T_K_N_R_L'.split('_'),\n    longDateFormat : {\n        LT   : 'H:mm',\n        LTS : 'H:mm:ss',\n        L    : 'DD.MM.YYYY',\n        LL   : 'D. MMMM YYYY',\n        LLL  : 'D. MMMM YYYY H:mm',\n        LLLL : 'dddd, D. MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay  : '[Täna,] LT',\n        nextDay  : '[Homme,] LT',\n        nextWeek : '[Järgmine] dddd LT',\n        lastDay  : '[Eile,] LT',\n        lastWeek : '[Eelmine] dddd LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s pärast',\n        past   : '%s tagasi',\n        s      : processRelativeTime$2,\n        m      : processRelativeTime$2,\n        mm     : processRelativeTime$2,\n        h      : processRelativeTime$2,\n        hh     : processRelativeTime$2,\n        d      : processRelativeTime$2,\n        dd     : '%d päeva',\n        M      : processRelativeTime$2,\n        MM     : processRelativeTime$2,\n        y      : processRelativeTime$2,\n        yy     : processRelativeTime$2\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\nhooks.defineLocale('eu', {\n    months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),\n    monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),\n    weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'),\n    weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'YYYY-MM-DD',\n        LL : 'YYYY[ko] MMMM[ren] D[a]',\n        LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n        LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n        l : 'YYYY-M-D',\n        ll : 'YYYY[ko] MMM D[a]',\n        lll : 'YYYY[ko] MMM D[a] HH:mm',\n        llll : 'ddd, YYYY[ko] MMM D[a] HH:mm'\n    },\n    calendar : {\n        sameDay : '[gaur] LT[etan]',\n        nextDay : '[bihar] LT[etan]',\n        nextWeek : 'dddd LT[etan]',\n        lastDay : '[atzo] LT[etan]',\n        lastWeek : '[aurreko] dddd LT[etan]',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s barru',\n        past : 'duela %s',\n        s : 'segundo batzuk',\n        m : 'minutu bat',\n        mm : '%d minutu',\n        h : 'ordu bat',\n        hh : '%d ordu',\n        d : 'egun bat',\n        dd : '%d egun',\n        M : 'hilabete bat',\n        MM : '%d hilabete',\n        y : 'urte bat',\n        yy : '%d urte'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\nvar symbolMap$5 = {\n    '1': '۱',\n    '2': '۲',\n    '3': '۳',\n    '4': '۴',\n    '5': '۵',\n    '6': '۶',\n    '7': '۷',\n    '8': '۸',\n    '9': '۹',\n    '0': '۰'\n};\nvar numberMap$4 = {\n    '۱': '1',\n    '۲': '2',\n    '۳': '3',\n    '۴': '4',\n    '۵': '5',\n    '۶': '6',\n    '۷': '7',\n    '۸': '8',\n    '۹': '9',\n    '۰': '0'\n};\n\nhooks.defineLocale('fa', {\n    months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n    monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n    weekdays : 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split('_'),\n    weekdaysShort : 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split('_'),\n    weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    meridiemParse: /قبل از ظهر|بعد از ظهر/,\n    isPM: function (input) {\n        return /بعد از ظهر/.test(input);\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return 'قبل از ظهر';\n        } else {\n            return 'بعد از ظهر';\n        }\n    },\n    calendar : {\n        sameDay : '[امروز ساعت] LT',\n        nextDay : '[فردا ساعت] LT',\n        nextWeek : 'dddd [ساعت] LT',\n        lastDay : '[دیروز ساعت] LT',\n        lastWeek : 'dddd [پیش] [ساعت] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'در %s',\n        past : '%s پیش',\n        s : 'چندین ثانیه',\n        m : 'یک دقیقه',\n        mm : '%d دقیقه',\n        h : 'یک ساعت',\n        hh : '%d ساعت',\n        d : 'یک روز',\n        dd : '%d روز',\n        M : 'یک ماه',\n        MM : '%d ماه',\n        y : 'یک سال',\n        yy : '%d سال'\n    },\n    preparse: function (string) {\n        return string.replace(/[۰-۹]/g, function (match) {\n            return numberMap$4[match];\n        }).replace(/،/g, ',');\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$5[match];\n        }).replace(/,/g, '،');\n    },\n    ordinalParse: /\\d{1,2}م/,\n    ordinal : '%dم',\n    week : {\n        dow : 6, // Saturday is the first day of the week.\n        doy : 12 // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\nvar numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');\nvar numbersFuture = [\n        'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',\n        numbersPast[7], numbersPast[8], numbersPast[9]\n    ];\nfunction translate$2(number, withoutSuffix, key, isFuture) {\n    var result = '';\n    switch (key) {\n        case 's':\n            return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n        case 'm':\n            return isFuture ? 'minuutin' : 'minuutti';\n        case 'mm':\n            result = isFuture ? 'minuutin' : 'minuuttia';\n            break;\n        case 'h':\n            return isFuture ? 'tunnin' : 'tunti';\n        case 'hh':\n            result = isFuture ? 'tunnin' : 'tuntia';\n            break;\n        case 'd':\n            return isFuture ? 'päivän' : 'päivä';\n        case 'dd':\n            result = isFuture ? 'päivän' : 'päivää';\n            break;\n        case 'M':\n            return isFuture ? 'kuukauden' : 'kuukausi';\n        case 'MM':\n            result = isFuture ? 'kuukauden' : 'kuukautta';\n            break;\n        case 'y':\n            return isFuture ? 'vuoden' : 'vuosi';\n        case 'yy':\n            result = isFuture ? 'vuoden' : 'vuotta';\n            break;\n    }\n    result = verbalNumber(number, isFuture) + ' ' + result;\n    return result;\n}\nfunction verbalNumber(number, isFuture) {\n    return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;\n}\n\nhooks.defineLocale('fi', {\n    months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),\n    monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),\n    weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),\n    weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'),\n    weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'),\n    longDateFormat : {\n        LT : 'HH.mm',\n        LTS : 'HH.mm.ss',\n        L : 'DD.MM.YYYY',\n        LL : 'Do MMMM[ta] YYYY',\n        LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm',\n        LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n        l : 'D.M.YYYY',\n        ll : 'Do MMM YYYY',\n        lll : 'Do MMM YYYY, [klo] HH.mm',\n        llll : 'ddd, Do MMM YYYY, [klo] HH.mm'\n    },\n    calendar : {\n        sameDay : '[tänään] [klo] LT',\n        nextDay : '[huomenna] [klo] LT',\n        nextWeek : 'dddd [klo] LT',\n        lastDay : '[eilen] [klo] LT',\n        lastWeek : '[viime] dddd[na] [klo] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s päästä',\n        past : '%s sitten',\n        s : translate$2,\n        m : translate$2,\n        mm : translate$2,\n        h : translate$2,\n        hh : translate$2,\n        d : translate$2,\n        dd : translate$2,\n        M : translate$2,\n        MM : translate$2,\n        y : translate$2,\n        yy : translate$2\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n\nhooks.defineLocale('fo', {\n    months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n    monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n    weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),\n    weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n    weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D. MMMM, YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[Í dag kl.] LT',\n        nextDay : '[Í morgin kl.] LT',\n        nextWeek : 'dddd [kl.] LT',\n        lastDay : '[Í gjár kl.] LT',\n        lastWeek : '[síðstu] dddd [kl] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'um %s',\n        past : '%s síðani',\n        s : 'fá sekund',\n        m : 'ein minutt',\n        mm : '%d minuttir',\n        h : 'ein tími',\n        hh : '%d tímar',\n        d : 'ein dagur',\n        dd : '%d dagar',\n        M : 'ein mánaði',\n        MM : '%d mánaðir',\n        y : 'eitt ár',\n        yy : '%d ár'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\nhooks.defineLocale('fr-ca', {\n    months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n    monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n    weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n    weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'YYYY-MM-DD',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Aujourd\\'hui à] LT',\n        nextDay: '[Demain à] LT',\n        nextWeek: 'dddd [à] LT',\n        lastDay: '[Hier à] LT',\n        lastWeek: 'dddd [dernier à] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'dans %s',\n        past : 'il y a %s',\n        s : 'quelques secondes',\n        m : 'une minute',\n        mm : '%d minutes',\n        h : 'une heure',\n        hh : '%d heures',\n        d : 'un jour',\n        dd : '%d jours',\n        M : 'un mois',\n        MM : '%d mois',\n        y : 'un an',\n        yy : '%d ans'\n    },\n    ordinalParse: /\\d{1,2}(er|e)/,\n    ordinal : function (number) {\n        return number + (number === 1 ? 'er' : 'e');\n    }\n});\n\n//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\nhooks.defineLocale('fr-ch', {\n    months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n    monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n    weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n    weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Aujourd\\'hui à] LT',\n        nextDay: '[Demain à] LT',\n        nextWeek: 'dddd [à] LT',\n        lastDay: '[Hier à] LT',\n        lastWeek: 'dddd [dernier à] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'dans %s',\n        past : 'il y a %s',\n        s : 'quelques secondes',\n        m : 'une minute',\n        mm : '%d minutes',\n        h : 'une heure',\n        hh : '%d heures',\n        d : 'un jour',\n        dd : '%d jours',\n        M : 'un mois',\n        MM : '%d mois',\n        y : 'un an',\n        yy : '%d ans'\n    },\n    ordinalParse: /\\d{1,2}(er|e)/,\n    ordinal : function (number) {\n        return number + (number === 1 ? 'er' : 'e');\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\nhooks.defineLocale('fr', {\n    months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n    monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n    weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n    weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Aujourd\\'hui à] LT',\n        nextDay: '[Demain à] LT',\n        nextWeek: 'dddd [à] LT',\n        lastDay: '[Hier à] LT',\n        lastWeek: 'dddd [dernier à] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'dans %s',\n        past : 'il y a %s',\n        s : 'quelques secondes',\n        m : 'une minute',\n        mm : '%d minutes',\n        h : 'une heure',\n        hh : '%d heures',\n        d : 'un jour',\n        dd : '%d jours',\n        M : 'un mois',\n        MM : '%d mois',\n        y : 'un an',\n        yy : '%d ans'\n    },\n    ordinalParse: /\\d{1,2}(er|)/,\n    ordinal : function (number) {\n        return number + (number === 1 ? 'er' : '');\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\nvar monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_');\nvar monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\nhooks.defineLocale('fy', {\n    months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),\n    monthsShort : function (m, format) {\n        if (/-MMM-/.test(format)) {\n            return monthsShortWithoutDots[m.month()];\n        } else {\n            return monthsShortWithDots[m.month()];\n        }\n    },\n    monthsParseExact : true,\n    weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),\n    weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'),\n    weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD-MM-YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[hjoed om] LT',\n        nextDay: '[moarn om] LT',\n        nextWeek: 'dddd [om] LT',\n        lastDay: '[juster om] LT',\n        lastWeek: '[ôfrûne] dddd [om] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'oer %s',\n        past : '%s lyn',\n        s : 'in pear sekonden',\n        m : 'ien minút',\n        mm : '%d minuten',\n        h : 'ien oere',\n        hh : '%d oeren',\n        d : 'ien dei',\n        dd : '%d dagen',\n        M : 'ien moanne',\n        MM : '%d moannen',\n        y : 'ien jier',\n        yy : '%d jierren'\n    },\n    ordinalParse: /\\d{1,2}(ste|de)/,\n    ordinal : function (number) {\n        return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\nvar months$5 = [\n    'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'\n];\n\nvar monthsShort$3 = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];\n\nvar weekdays$1 = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];\n\nvar weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];\n\nvar weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\nhooks.defineLocale('gd', {\n    months : months$5,\n    monthsShort : monthsShort$3,\n    monthsParseExact : true,\n    weekdays : weekdays$1,\n    weekdaysShort : weekdaysShort,\n    weekdaysMin : weekdaysMin,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[An-diugh aig] LT',\n        nextDay : '[A-màireach aig] LT',\n        nextWeek : 'dddd [aig] LT',\n        lastDay : '[An-dè aig] LT',\n        lastWeek : 'dddd [seo chaidh] [aig] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'ann an %s',\n        past : 'bho chionn %s',\n        s : 'beagan diogan',\n        m : 'mionaid',\n        mm : '%d mionaidean',\n        h : 'uair',\n        hh : '%d uairean',\n        d : 'latha',\n        dd : '%d latha',\n        M : 'mìos',\n        MM : '%d mìosan',\n        y : 'bliadhna',\n        yy : '%d bliadhna'\n    },\n    ordinalParse : /\\d{1,2}(d|na|mh)/,\n    ordinal : function (number) {\n        var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\nhooks.defineLocale('gl', {\n    months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),\n    monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),\n    monthsParseExact: true,\n    weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n    weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n    weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D [de] MMMM [de] YYYY',\n        LLL : 'D [de] MMMM [de] YYYY H:mm',\n        LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'\n    },\n    calendar : {\n        sameDay : function () {\n            return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';\n        },\n        nextDay : function () {\n            return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';\n        },\n        nextWeek : function () {\n            return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';\n        },\n        lastDay : function () {\n            return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';\n        },\n        lastWeek : function () {\n            return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : function (str) {\n            if (str.indexOf('un') === 0) {\n                return 'n' + str;\n            }\n            return 'en ' + str;\n        },\n        past : 'hai %s',\n        s : 'uns segundos',\n        m : 'un minuto',\n        mm : '%d minutos',\n        h : 'unha hora',\n        hh : '%d horas',\n        d : 'un día',\n        dd : '%d días',\n        M : 'un mes',\n        MM : '%d meses',\n        y : 'un ano',\n        yy : '%d anos'\n    },\n    ordinalParse : /\\d{1,2}º/,\n    ordinal : '%dº',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\nhooks.defineLocale('he', {\n    months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),\n    monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n    weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n    weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n    weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D [ב]MMMM YYYY',\n        LLL : 'D [ב]MMMM YYYY HH:mm',\n        LLLL : 'dddd, D [ב]MMMM YYYY HH:mm',\n        l : 'D/M/YYYY',\n        ll : 'D MMM YYYY',\n        lll : 'D MMM YYYY HH:mm',\n        llll : 'ddd, D MMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[היום ב־]LT',\n        nextDay : '[מחר ב־]LT',\n        nextWeek : 'dddd [בשעה] LT',\n        lastDay : '[אתמול ב־]LT',\n        lastWeek : '[ביום] dddd [האחרון בשעה] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'בעוד %s',\n        past : 'לפני %s',\n        s : 'מספר שניות',\n        m : 'דקה',\n        mm : '%d דקות',\n        h : 'שעה',\n        hh : function (number) {\n            if (number === 2) {\n                return 'שעתיים';\n            }\n            return number + ' שעות';\n        },\n        d : 'יום',\n        dd : function (number) {\n            if (number === 2) {\n                return 'יומיים';\n            }\n            return number + ' ימים';\n        },\n        M : 'חודש',\n        MM : function (number) {\n            if (number === 2) {\n                return 'חודשיים';\n            }\n            return number + ' חודשים';\n        },\n        y : 'שנה',\n        yy : function (number) {\n            if (number === 2) {\n                return 'שנתיים';\n            } else if (number % 10 === 0 && number !== 10) {\n                return number + ' שנה';\n            }\n            return number + ' שנים';\n        }\n    },\n    meridiemParse: /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n    isPM : function (input) {\n        return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 5) {\n            return 'לפנות בוקר';\n        } else if (hour < 10) {\n            return 'בבוקר';\n        } else if (hour < 12) {\n            return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n        } else if (hour < 18) {\n            return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n        } else {\n            return 'בערב';\n        }\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\nvar symbolMap$6 = {\n    '1': '१',\n    '2': '२',\n    '3': '३',\n    '4': '४',\n    '5': '५',\n    '6': '६',\n    '7': '७',\n    '8': '८',\n    '9': '९',\n    '0': '०'\n};\nvar numberMap$5 = {\n    '१': '1',\n    '२': '2',\n    '३': '3',\n    '४': '4',\n    '५': '5',\n    '६': '6',\n    '७': '7',\n    '८': '8',\n    '९': '9',\n    '०': '0'\n};\n\nhooks.defineLocale('hi', {\n    months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),\n    monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n    monthsParseExact: true,\n    weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n    weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n    weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),\n    longDateFormat : {\n        LT : 'A h:mm बजे',\n        LTS : 'A h:mm:ss बजे',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, A h:mm बजे',\n        LLLL : 'dddd, D MMMM YYYY, A h:mm बजे'\n    },\n    calendar : {\n        sameDay : '[आज] LT',\n        nextDay : '[कल] LT',\n        nextWeek : 'dddd, LT',\n        lastDay : '[कल] LT',\n        lastWeek : '[पिछले] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s में',\n        past : '%s पहले',\n        s : 'कुछ ही क्षण',\n        m : 'एक मिनट',\n        mm : '%d मिनट',\n        h : 'एक घंटा',\n        hh : '%d घंटे',\n        d : 'एक दिन',\n        dd : '%d दिन',\n        M : 'एक महीने',\n        MM : '%d महीने',\n        y : 'एक वर्ष',\n        yy : '%d वर्ष'\n    },\n    preparse: function (string) {\n        return string.replace(/[१२३४५६७८९०]/g, function (match) {\n            return numberMap$5[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$6[match];\n        });\n    },\n    // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n    // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n    meridiemParse: /रात|सुबह|दोपहर|शाम/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'रात') {\n            return hour < 4 ? hour : hour + 12;\n        } else if (meridiem === 'सुबह') {\n            return hour;\n        } else if (meridiem === 'दोपहर') {\n            return hour >= 10 ? hour : hour + 12;\n        } else if (meridiem === 'शाम') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'रात';\n        } else if (hour < 10) {\n            return 'सुबह';\n        } else if (hour < 17) {\n            return 'दोपहर';\n        } else if (hour < 20) {\n            return 'शाम';\n        } else {\n            return 'रात';\n        }\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\nfunction translate$3(number, withoutSuffix, key) {\n    var result = number + ' ';\n    switch (key) {\n        case 'm':\n            return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n        case 'mm':\n            if (number === 1) {\n                result += 'minuta';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'minute';\n            } else {\n                result += 'minuta';\n            }\n            return result;\n        case 'h':\n            return withoutSuffix ? 'jedan sat' : 'jednog sata';\n        case 'hh':\n            if (number === 1) {\n                result += 'sat';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'sata';\n            } else {\n                result += 'sati';\n            }\n            return result;\n        case 'dd':\n            if (number === 1) {\n                result += 'dan';\n            } else {\n                result += 'dana';\n            }\n            return result;\n        case 'MM':\n            if (number === 1) {\n                result += 'mjesec';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'mjeseca';\n            } else {\n                result += 'mjeseci';\n            }\n            return result;\n        case 'yy':\n            if (number === 1) {\n                result += 'godina';\n            } else if (number === 2 || number === 3 || number === 4) {\n                result += 'godine';\n            } else {\n                result += 'godina';\n            }\n            return result;\n    }\n}\n\nhooks.defineLocale('hr', {\n    months : {\n        format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),\n        standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')\n    },\n    monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),\n    monthsParseExact: true,\n    weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n    weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n    weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY H:mm',\n        LLLL : 'dddd, D. MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay  : '[danas u] LT',\n        nextDay  : '[sutra u] LT',\n        nextWeek : function () {\n            switch (this.day()) {\n                case 0:\n                    return '[u] [nedjelju] [u] LT';\n                case 3:\n                    return '[u] [srijedu] [u] LT';\n                case 6:\n                    return '[u] [subotu] [u] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[u] dddd [u] LT';\n            }\n        },\n        lastDay  : '[jučer u] LT',\n        lastWeek : function () {\n            switch (this.day()) {\n                case 0:\n                case 3:\n                    return '[prošlu] dddd [u] LT';\n                case 6:\n                    return '[prošle] [subote] [u] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[prošli] dddd [u] LT';\n            }\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'za %s',\n        past   : 'prije %s',\n        s      : 'par sekundi',\n        m      : translate$3,\n        mm     : translate$3,\n        h      : translate$3,\n        hh     : translate$3,\n        d      : 'dan',\n        dd     : translate$3,\n        M      : 'mjesec',\n        MM     : translate$3,\n        y      : 'godinu',\n        yy     : translate$3\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n\nvar weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\nfunction translate$4(number, withoutSuffix, key, isFuture) {\n    var num = number,\n        suffix;\n    switch (key) {\n        case 's':\n            return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';\n        case 'm':\n            return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n        case 'mm':\n            return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n        case 'h':\n            return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n        case 'hh':\n            return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n        case 'd':\n            return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n        case 'dd':\n            return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n        case 'M':\n            return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n        case 'MM':\n            return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n        case 'y':\n            return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n        case 'yy':\n            return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n    }\n    return '';\n}\nfunction week(isFuture) {\n    return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';\n}\n\nhooks.defineLocale('hu', {\n    months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),\n    monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),\n    weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n    weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n    weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'YYYY.MM.DD.',\n        LL : 'YYYY. MMMM D.',\n        LLL : 'YYYY. MMMM D. H:mm',\n        LLLL : 'YYYY. MMMM D., dddd H:mm'\n    },\n    meridiemParse: /de|du/i,\n    isPM: function (input) {\n        return input.charAt(1).toLowerCase() === 'u';\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 12) {\n            return isLower === true ? 'de' : 'DE';\n        } else {\n            return isLower === true ? 'du' : 'DU';\n        }\n    },\n    calendar : {\n        sameDay : '[ma] LT[-kor]',\n        nextDay : '[holnap] LT[-kor]',\n        nextWeek : function () {\n            return week.call(this, true);\n        },\n        lastDay : '[tegnap] LT[-kor]',\n        lastWeek : function () {\n            return week.call(this, false);\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s múlva',\n        past : '%s',\n        s : translate$4,\n        m : translate$4,\n        mm : translate$4,\n        h : translate$4,\n        hh : translate$4,\n        d : translate$4,\n        dd : translate$4,\n        M : translate$4,\n        MM : translate$4,\n        y : translate$4,\n        yy : translate$4\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\nhooks.defineLocale('hy-am', {\n    months : {\n        format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),\n        standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')\n    },\n    monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n    weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),\n    weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n    weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY թ.',\n        LLL : 'D MMMM YYYY թ., HH:mm',\n        LLLL : 'dddd, D MMMM YYYY թ., HH:mm'\n    },\n    calendar : {\n        sameDay: '[այսօր] LT',\n        nextDay: '[վաղը] LT',\n        lastDay: '[երեկ] LT',\n        nextWeek: function () {\n            return 'dddd [օրը ժամը] LT';\n        },\n        lastWeek: function () {\n            return '[անցած] dddd [օրը ժամը] LT';\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : '%s հետո',\n        past : '%s առաջ',\n        s : 'մի քանի վայրկյան',\n        m : 'րոպե',\n        mm : '%d րոպե',\n        h : 'ժամ',\n        hh : '%d ժամ',\n        d : 'օր',\n        dd : '%d օր',\n        M : 'ամիս',\n        MM : '%d ամիս',\n        y : 'տարի',\n        yy : '%d տարի'\n    },\n    meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n    isPM: function (input) {\n        return /^(ցերեկվա|երեկոյան)$/.test(input);\n    },\n    meridiem : function (hour) {\n        if (hour < 4) {\n            return 'գիշերվա';\n        } else if (hour < 12) {\n            return 'առավոտվա';\n        } else if (hour < 17) {\n            return 'ցերեկվա';\n        } else {\n            return 'երեկոյան';\n        }\n    },\n    ordinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n    ordinal: function (number, period) {\n        switch (period) {\n            case 'DDD':\n            case 'w':\n            case 'W':\n            case 'DDDo':\n                if (number === 1) {\n                    return number + '-ին';\n                }\n                return number + '-րդ';\n            default:\n                return number;\n        }\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\nhooks.defineLocale('id', {\n    months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),\n    monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),\n    weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n    weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n    weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n    longDateFormat : {\n        LT : 'HH.mm',\n        LTS : 'HH.mm.ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY [pukul] HH.mm',\n        LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n    },\n    meridiemParse: /pagi|siang|sore|malam/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'pagi') {\n            return hour;\n        } else if (meridiem === 'siang') {\n            return hour >= 11 ? hour : hour + 12;\n        } else if (meridiem === 'sore' || meridiem === 'malam') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 11) {\n            return 'pagi';\n        } else if (hours < 15) {\n            return 'siang';\n        } else if (hours < 19) {\n            return 'sore';\n        } else {\n            return 'malam';\n        }\n    },\n    calendar : {\n        sameDay : '[Hari ini pukul] LT',\n        nextDay : '[Besok pukul] LT',\n        nextWeek : 'dddd [pukul] LT',\n        lastDay : '[Kemarin pukul] LT',\n        lastWeek : 'dddd [lalu pukul] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'dalam %s',\n        past : '%s yang lalu',\n        s : 'beberapa detik',\n        m : 'semenit',\n        mm : '%d menit',\n        h : 'sejam',\n        hh : '%d jam',\n        d : 'sehari',\n        dd : '%d hari',\n        M : 'sebulan',\n        MM : '%d bulan',\n        y : 'setahun',\n        yy : '%d tahun'\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\nfunction plural$2(n) {\n    if (n % 100 === 11) {\n        return true;\n    } else if (n % 10 === 1) {\n        return false;\n    }\n    return true;\n}\nfunction translate$5(number, withoutSuffix, key, isFuture) {\n    var result = number + ' ';\n    switch (key) {\n        case 's':\n            return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';\n        case 'm':\n            return withoutSuffix ? 'mínúta' : 'mínútu';\n        case 'mm':\n            if (plural$2(number)) {\n                return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');\n            } else if (withoutSuffix) {\n                return result + 'mínúta';\n            }\n            return result + 'mínútu';\n        case 'hh':\n            if (plural$2(number)) {\n                return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');\n            }\n            return result + 'klukkustund';\n        case 'd':\n            if (withoutSuffix) {\n                return 'dagur';\n            }\n            return isFuture ? 'dag' : 'degi';\n        case 'dd':\n            if (plural$2(number)) {\n                if (withoutSuffix) {\n                    return result + 'dagar';\n                }\n                return result + (isFuture ? 'daga' : 'dögum');\n            } else if (withoutSuffix) {\n                return result + 'dagur';\n            }\n            return result + (isFuture ? 'dag' : 'degi');\n        case 'M':\n            if (withoutSuffix) {\n                return 'mánuður';\n            }\n            return isFuture ? 'mánuð' : 'mánuði';\n        case 'MM':\n            if (plural$2(number)) {\n                if (withoutSuffix) {\n                    return result + 'mánuðir';\n                }\n                return result + (isFuture ? 'mánuði' : 'mánuðum');\n            } else if (withoutSuffix) {\n                return result + 'mánuður';\n            }\n            return result + (isFuture ? 'mánuð' : 'mánuði');\n        case 'y':\n            return withoutSuffix || isFuture ? 'ár' : 'ári';\n        case 'yy':\n            if (plural$2(number)) {\n                return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n            }\n            return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n    }\n}\n\nhooks.defineLocale('is', {\n    months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),\n    monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n    weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),\n    weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n    weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY [kl.] H:mm',\n        LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm'\n    },\n    calendar : {\n        sameDay : '[í dag kl.] LT',\n        nextDay : '[á morgun kl.] LT',\n        nextWeek : 'dddd [kl.] LT',\n        lastDay : '[í gær kl.] LT',\n        lastWeek : '[síðasta] dddd [kl.] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'eftir %s',\n        past : 'fyrir %s síðan',\n        s : translate$5,\n        m : translate$5,\n        mm : translate$5,\n        h : 'klukkustund',\n        hh : translate$5,\n        d : translate$5,\n        dd : translate$5,\n        M : translate$5,\n        MM : translate$5,\n        y : translate$5,\n        yy : translate$5\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n\nhooks.defineLocale('it', {\n    months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n    monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n    weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'),\n    weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'),\n    weekdaysMin : 'Do_Lu_Ma_Me_Gi_Ve_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Oggi alle] LT',\n        nextDay: '[Domani alle] LT',\n        nextWeek: 'dddd [alle] LT',\n        lastDay: '[Ieri alle] LT',\n        lastWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[la scorsa] dddd [alle] LT';\n                default:\n                    return '[lo scorso] dddd [alle] LT';\n            }\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : function (s) {\n            return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;\n        },\n        past : '%s fa',\n        s : 'alcuni secondi',\n        m : 'un minuto',\n        mm : '%d minuti',\n        h : 'un\\'ora',\n        hh : '%d ore',\n        d : 'un giorno',\n        dd : '%d giorni',\n        M : 'un mese',\n        MM : '%d mesi',\n        y : 'un anno',\n        yy : '%d anni'\n    },\n    ordinalParse : /\\d{1,2}º/,\n    ordinal: '%dº',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\nhooks.defineLocale('ja', {\n    months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n    monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n    weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n    weekdaysShort : '日_月_火_水_木_金_土'.split('_'),\n    weekdaysMin : '日_月_火_水_木_金_土'.split('_'),\n    longDateFormat : {\n        LT : 'Ah時m分',\n        LTS : 'Ah時m分s秒',\n        L : 'YYYY/MM/DD',\n        LL : 'YYYY年M月D日',\n        LLL : 'YYYY年M月D日Ah時m分',\n        LLLL : 'YYYY年M月D日Ah時m分 dddd'\n    },\n    meridiemParse: /午前|午後/i,\n    isPM : function (input) {\n        return input === '午後';\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return '午前';\n        } else {\n            return '午後';\n        }\n    },\n    calendar : {\n        sameDay : '[今日] LT',\n        nextDay : '[明日] LT',\n        nextWeek : '[来週]dddd LT',\n        lastDay : '[昨日] LT',\n        lastWeek : '[前週]dddd LT',\n        sameElse : 'L'\n    },\n    ordinalParse : /\\d{1,2}日/,\n    ordinal : function (number, period) {\n        switch (period) {\n            case 'd':\n            case 'D':\n            case 'DDD':\n                return number + '日';\n            default:\n                return number;\n        }\n    },\n    relativeTime : {\n        future : '%s後',\n        past : '%s前',\n        s : '数秒',\n        m : '1分',\n        mm : '%d分',\n        h : '1時間',\n        hh : '%d時間',\n        d : '1日',\n        dd : '%d日',\n        M : '1ヶ月',\n        MM : '%dヶ月',\n        y : '1年',\n        yy : '%d年'\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\nhooks.defineLocale('jv', {\n    months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),\n    monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n    weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n    weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n    weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n    longDateFormat : {\n        LT : 'HH.mm',\n        LTS : 'HH.mm.ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY [pukul] HH.mm',\n        LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n    },\n    meridiemParse: /enjing|siyang|sonten|ndalu/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'enjing') {\n            return hour;\n        } else if (meridiem === 'siyang') {\n            return hour >= 11 ? hour : hour + 12;\n        } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 11) {\n            return 'enjing';\n        } else if (hours < 15) {\n            return 'siyang';\n        } else if (hours < 19) {\n            return 'sonten';\n        } else {\n            return 'ndalu';\n        }\n    },\n    calendar : {\n        sameDay : '[Dinten puniko pukul] LT',\n        nextDay : '[Mbenjang pukul] LT',\n        nextWeek : 'dddd [pukul] LT',\n        lastDay : '[Kala wingi pukul] LT',\n        lastWeek : 'dddd [kepengker pukul] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'wonten ing %s',\n        past : '%s ingkang kepengker',\n        s : 'sawetawis detik',\n        m : 'setunggal menit',\n        mm : '%d menit',\n        h : 'setunggal jam',\n        hh : '%d jam',\n        d : 'sedinten',\n        dd : '%d dinten',\n        M : 'sewulan',\n        MM : '%d wulan',\n        y : 'setaun',\n        yy : '%d taun'\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/irakli-janiashvili\n\nhooks.defineLocale('ka', {\n    months : {\n        standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),\n        format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')\n    },\n    monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n    weekdays : {\n        standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),\n        format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),\n        isFormat: /(წინა|შემდეგ)/\n    },\n    weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n    weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY h:mm A',\n        LLLL : 'dddd, D MMMM YYYY h:mm A'\n    },\n    calendar : {\n        sameDay : '[დღეს] LT[-ზე]',\n        nextDay : '[ხვალ] LT[-ზე]',\n        lastDay : '[გუშინ] LT[-ზე]',\n        nextWeek : '[შემდეგ] dddd LT[-ზე]',\n        lastWeek : '[წინა] dddd LT-ზე',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : function (s) {\n            return (/(წამი|წუთი|საათი|წელი)/).test(s) ?\n                s.replace(/ი$/, 'ში') :\n                s + 'ში';\n        },\n        past : function (s) {\n            if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {\n                return s.replace(/(ი|ე)$/, 'ის წინ');\n            }\n            if ((/წელი/).test(s)) {\n                return s.replace(/წელი$/, 'წლის წინ');\n            }\n        },\n        s : 'რამდენიმე წამი',\n        m : 'წუთი',\n        mm : '%d წუთი',\n        h : 'საათი',\n        hh : '%d საათი',\n        d : 'დღე',\n        dd : '%d დღე',\n        M : 'თვე',\n        MM : '%d თვე',\n        y : 'წელი',\n        yy : '%d წელი'\n    },\n    ordinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n    ordinal : function (number) {\n        if (number === 0) {\n            return number;\n        }\n        if (number === 1) {\n            return number + '-ლი';\n        }\n        if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {\n            return 'მე-' + number;\n        }\n        return number + '-ე';\n    },\n    week : {\n        dow : 1,\n        doy : 7\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\nvar suffixes$1 = {\n    0: '-ші',\n    1: '-ші',\n    2: '-ші',\n    3: '-ші',\n    4: '-ші',\n    5: '-ші',\n    6: '-шы',\n    7: '-ші',\n    8: '-ші',\n    9: '-шы',\n    10: '-шы',\n    20: '-шы',\n    30: '-шы',\n    40: '-шы',\n    50: '-ші',\n    60: '-шы',\n    70: '-ші',\n    80: '-ші',\n    90: '-шы',\n    100: '-ші'\n};\n\nhooks.defineLocale('kk', {\n    months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),\n    monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n    weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),\n    weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n    weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[Бүгін сағат] LT',\n        nextDay : '[Ертең сағат] LT',\n        nextWeek : 'dddd [сағат] LT',\n        lastDay : '[Кеше сағат] LT',\n        lastWeek : '[Өткен аптаның] dddd [сағат] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s ішінде',\n        past : '%s бұрын',\n        s : 'бірнеше секунд',\n        m : 'бір минут',\n        mm : '%d минут',\n        h : 'бір сағат',\n        hh : '%d сағат',\n        d : 'бір күн',\n        dd : '%d күн',\n        M : 'бір ай',\n        MM : '%d ай',\n        y : 'бір жыл',\n        yy : '%d жыл'\n    },\n    ordinalParse: /\\d{1,2}-(ші|шы)/,\n    ordinal : function (number) {\n        var a = number % 10,\n            b = number >= 100 ? 100 : null;\n        return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]);\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\nhooks.defineLocale('km', {\n    months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n    monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n    weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n    weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n    weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n    longDateFormat: {\n        LT: 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L: 'DD/MM/YYYY',\n        LL: 'D MMMM YYYY',\n        LLL: 'D MMMM YYYY HH:mm',\n        LLLL: 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar: {\n        sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n        nextDay: '[ស្អែក ម៉ោង] LT',\n        nextWeek: 'dddd [ម៉ោង] LT',\n        lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n        lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n        sameElse: 'L'\n    },\n    relativeTime: {\n        future: '%sទៀត',\n        past: '%sមុន',\n        s: 'ប៉ុន្មានវិនាទី',\n        m: 'មួយនាទី',\n        mm: '%d នាទី',\n        h: 'មួយម៉ោង',\n        hh: '%d ម៉ោង',\n        d: 'មួយថ្ងៃ',\n        dd: '%d ថ្ងៃ',\n        M: 'មួយខែ',\n        MM: '%d ខែ',\n        y: 'មួយឆ្នាំ',\n        yy: '%d ឆ្នាំ'\n    },\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4 // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\nhooks.defineLocale('ko', {\n    months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n    monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n    weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n    weekdaysShort : '일_월_화_수_목_금_토'.split('_'),\n    weekdaysMin : '일_월_화_수_목_금_토'.split('_'),\n    longDateFormat : {\n        LT : 'A h시 m분',\n        LTS : 'A h시 m분 s초',\n        L : 'YYYY.MM.DD',\n        LL : 'YYYY년 MMMM D일',\n        LLL : 'YYYY년 MMMM D일 A h시 m분',\n        LLLL : 'YYYY년 MMMM D일 dddd A h시 m분'\n    },\n    calendar : {\n        sameDay : '오늘 LT',\n        nextDay : '내일 LT',\n        nextWeek : 'dddd LT',\n        lastDay : '어제 LT',\n        lastWeek : '지난주 dddd LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s 후',\n        past : '%s 전',\n        s : '몇 초',\n        ss : '%d초',\n        m : '일분',\n        mm : '%d분',\n        h : '한 시간',\n        hh : '%d시간',\n        d : '하루',\n        dd : '%d일',\n        M : '한 달',\n        MM : '%d달',\n        y : '일 년',\n        yy : '%d년'\n    },\n    ordinalParse : /\\d{1,2}일/,\n    ordinal : '%d일',\n    meridiemParse : /오전|오후/,\n    isPM : function (token) {\n        return token === '오후';\n    },\n    meridiem : function (hour, minute, isUpper) {\n        return hour < 12 ? '오전' : '오후';\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n\nvar suffixes$2 = {\n    0: '-чү',\n    1: '-чи',\n    2: '-чи',\n    3: '-чү',\n    4: '-чү',\n    5: '-чи',\n    6: '-чы',\n    7: '-чи',\n    8: '-чи',\n    9: '-чу',\n    10: '-чу',\n    20: '-чы',\n    30: '-чу',\n    40: '-чы',\n    50: '-чү',\n    60: '-чы',\n    70: '-чи',\n    80: '-чи',\n    90: '-чу',\n    100: '-чү'\n};\n\nhooks.defineLocale('ky', {\n    months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),\n    monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),\n    weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),\n    weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n    weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[Бүгүн саат] LT',\n        nextDay : '[Эртең саат] LT',\n        nextWeek : 'dddd [саат] LT',\n        lastDay : '[Кече саат] LT',\n        lastWeek : '[Өткен аптанын] dddd [күнү] [саат] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s ичинде',\n        past : '%s мурун',\n        s : 'бирнече секунд',\n        m : 'бир мүнөт',\n        mm : '%d мүнөт',\n        h : 'бир саат',\n        hh : '%d саат',\n        d : 'бир күн',\n        dd : '%d күн',\n        M : 'бир ай',\n        MM : '%d ай',\n        y : 'бир жыл',\n        yy : '%d жыл'\n    },\n    ordinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n    ordinal : function (number) {\n        var a = number % 10,\n            b = number >= 100 ? 100 : null;\n        return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]);\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\nfunction processRelativeTime$3(number, withoutSuffix, key, isFuture) {\n    var format = {\n        'm': ['eng Minutt', 'enger Minutt'],\n        'h': ['eng Stonn', 'enger Stonn'],\n        'd': ['een Dag', 'engem Dag'],\n        'M': ['ee Mount', 'engem Mount'],\n        'y': ['ee Joer', 'engem Joer']\n    };\n    return withoutSuffix ? format[key][0] : format[key][1];\n}\nfunction processFutureTime(string) {\n    var number = string.substr(0, string.indexOf(' '));\n    if (eifelerRegelAppliesToNumber(number)) {\n        return 'a ' + string;\n    }\n    return 'an ' + string;\n}\nfunction processPastTime(string) {\n    var number = string.substr(0, string.indexOf(' '));\n    if (eifelerRegelAppliesToNumber(number)) {\n        return 'viru ' + string;\n    }\n    return 'virun ' + string;\n}\n/**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\nfunction eifelerRegelAppliesToNumber(number) {\n    number = parseInt(number, 10);\n    if (isNaN(number)) {\n        return false;\n    }\n    if (number < 0) {\n        // Negative Number --> always true\n        return true;\n    } else if (number < 10) {\n        // Only 1 digit\n        if (4 <= number && number <= 7) {\n            return true;\n        }\n        return false;\n    } else if (number < 100) {\n        // 2 digits\n        var lastDigit = number % 10, firstDigit = number / 10;\n        if (lastDigit === 0) {\n            return eifelerRegelAppliesToNumber(firstDigit);\n        }\n        return eifelerRegelAppliesToNumber(lastDigit);\n    } else if (number < 10000) {\n        // 3 or 4 digits --> recursively check first digit\n        while (number >= 10) {\n            number = number / 10;\n        }\n        return eifelerRegelAppliesToNumber(number);\n    } else {\n        // Anything larger than 4 digits: recursively check first n-3 digits\n        number = number / 1000;\n        return eifelerRegelAppliesToNumber(number);\n    }\n}\n\nhooks.defineLocale('lb', {\n    months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n    monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n    monthsParseExact : true,\n    weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),\n    weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n    weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat: {\n        LT: 'H:mm [Auer]',\n        LTS: 'H:mm:ss [Auer]',\n        L: 'DD.MM.YYYY',\n        LL: 'D. MMMM YYYY',\n        LLL: 'D. MMMM YYYY H:mm [Auer]',\n        LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'\n    },\n    calendar: {\n        sameDay: '[Haut um] LT',\n        sameElse: 'L',\n        nextDay: '[Muer um] LT',\n        nextWeek: 'dddd [um] LT',\n        lastDay: '[Gëschter um] LT',\n        lastWeek: function () {\n            // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n            switch (this.day()) {\n                case 2:\n                case 4:\n                    return '[Leschten] dddd [um] LT';\n                default:\n                    return '[Leschte] dddd [um] LT';\n            }\n        }\n    },\n    relativeTime : {\n        future : processFutureTime,\n        past : processPastTime,\n        s : 'e puer Sekonnen',\n        m : processRelativeTime$3,\n        mm : '%d Minutten',\n        h : processRelativeTime$3,\n        hh : '%d Stonnen',\n        d : processRelativeTime$3,\n        dd : '%d Deeg',\n        M : processRelativeTime$3,\n        MM : '%d Méint',\n        y : processRelativeTime$3,\n        yy : '%d Joer'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal: '%d.',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\nhooks.defineLocale('lo', {\n    months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n    monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n    weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n    weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n    weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'ວັນdddd D MMMM YYYY HH:mm'\n    },\n    meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n    isPM: function (input) {\n        return input === 'ຕອນແລງ';\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return 'ຕອນເຊົ້າ';\n        } else {\n            return 'ຕອນແລງ';\n        }\n    },\n    calendar : {\n        sameDay : '[ມື້ນີ້ເວລາ] LT',\n        nextDay : '[ມື້ອື່ນເວລາ] LT',\n        nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT',\n        lastDay : '[ມື້ວານນີ້ເວລາ] LT',\n        lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'ອີກ %s',\n        past : '%sຜ່ານມາ',\n        s : 'ບໍ່ເທົ່າໃດວິນາທີ',\n        m : '1 ນາທີ',\n        mm : '%d ນາທີ',\n        h : '1 ຊົ່ວໂມງ',\n        hh : '%d ຊົ່ວໂມງ',\n        d : '1 ມື້',\n        dd : '%d ມື້',\n        M : '1 ເດືອນ',\n        MM : '%d ເດືອນ',\n        y : '1 ປີ',\n        yy : '%d ປີ'\n    },\n    ordinalParse: /(ທີ່)\\d{1,2}/,\n    ordinal : function (number) {\n        return 'ທີ່' + number;\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\nvar units = {\n    'm' : 'minutė_minutės_minutę',\n    'mm': 'minutės_minučių_minutes',\n    'h' : 'valanda_valandos_valandą',\n    'hh': 'valandos_valandų_valandas',\n    'd' : 'diena_dienos_dieną',\n    'dd': 'dienos_dienų_dienas',\n    'M' : 'mėnuo_mėnesio_mėnesį',\n    'MM': 'mėnesiai_mėnesių_mėnesius',\n    'y' : 'metai_metų_metus',\n    'yy': 'metai_metų_metus'\n};\nfunction translateSeconds(number, withoutSuffix, key, isFuture) {\n    if (withoutSuffix) {\n        return 'kelios sekundės';\n    } else {\n        return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n    }\n}\nfunction translateSingular(number, withoutSuffix, key, isFuture) {\n    return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);\n}\nfunction special(number) {\n    return number % 10 === 0 || (number > 10 && number < 20);\n}\nfunction forms(key) {\n    return units[key].split('_');\n}\nfunction translate$6(number, withoutSuffix, key, isFuture) {\n    var result = number + ' ';\n    if (number === 1) {\n        return result + translateSingular(number, withoutSuffix, key[0], isFuture);\n    } else if (withoutSuffix) {\n        return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n    } else {\n        if (isFuture) {\n            return result + forms(key)[1];\n        } else {\n            return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n        }\n    }\n}\nhooks.defineLocale('lt', {\n    months : {\n        format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),\n        standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),\n        isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/\n    },\n    monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n    weekdays : {\n        format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),\n        standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),\n        isFormat: /dddd HH:mm/\n    },\n    weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n    weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'YYYY-MM-DD',\n        LL : 'YYYY [m.] MMMM D [d.]',\n        LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n        LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n        l : 'YYYY-MM-DD',\n        ll : 'YYYY [m.] MMMM D [d.]',\n        lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n        llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'\n    },\n    calendar : {\n        sameDay : '[Šiandien] LT',\n        nextDay : '[Rytoj] LT',\n        nextWeek : 'dddd LT',\n        lastDay : '[Vakar] LT',\n        lastWeek : '[Praėjusį] dddd LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'po %s',\n        past : 'prieš %s',\n        s : translateSeconds,\n        m : translateSingular,\n        mm : translate$6,\n        h : translateSingular,\n        hh : translate$6,\n        d : translateSingular,\n        dd : translate$6,\n        M : translateSingular,\n        MM : translate$6,\n        y : translateSingular,\n        yy : translate$6\n    },\n    ordinalParse: /\\d{1,2}-oji/,\n    ordinal : function (number) {\n        return number + '-oji';\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\nvar units$1 = {\n    'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n    'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n    'h': 'stundas_stundām_stunda_stundas'.split('_'),\n    'hh': 'stundas_stundām_stunda_stundas'.split('_'),\n    'd': 'dienas_dienām_diena_dienas'.split('_'),\n    'dd': 'dienas_dienām_diena_dienas'.split('_'),\n    'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n    'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n    'y': 'gada_gadiem_gads_gadi'.split('_'),\n    'yy': 'gada_gadiem_gads_gadi'.split('_')\n};\n/**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\nfunction format$1(forms, number, withoutSuffix) {\n    if (withoutSuffix) {\n        // E.g. \"21 minūte\", \"3 minūtes\".\n        return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n    } else {\n        // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n        // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n        return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n    }\n}\nfunction relativeTimeWithPlural$1(number, withoutSuffix, key) {\n    return number + ' ' + format$1(units$1[key], number, withoutSuffix);\n}\nfunction relativeTimeWithSingular(number, withoutSuffix, key) {\n    return format$1(units$1[key], number, withoutSuffix);\n}\nfunction relativeSeconds(number, withoutSuffix) {\n    return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n}\n\nhooks.defineLocale('lv', {\n    months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),\n    monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n    weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),\n    weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),\n    weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY.',\n        LL : 'YYYY. [gada] D. MMMM',\n        LLL : 'YYYY. [gada] D. MMMM, HH:mm',\n        LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'\n    },\n    calendar : {\n        sameDay : '[Šodien pulksten] LT',\n        nextDay : '[Rīt pulksten] LT',\n        nextWeek : 'dddd [pulksten] LT',\n        lastDay : '[Vakar pulksten] LT',\n        lastWeek : '[Pagājušā] dddd [pulksten] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'pēc %s',\n        past : 'pirms %s',\n        s : relativeSeconds,\n        m : relativeTimeWithSingular,\n        mm : relativeTimeWithPlural$1,\n        h : relativeTimeWithSingular,\n        hh : relativeTimeWithPlural$1,\n        d : relativeTimeWithSingular,\n        dd : relativeTimeWithPlural$1,\n        M : relativeTimeWithSingular,\n        MM : relativeTimeWithPlural$1,\n        y : relativeTimeWithSingular,\n        yy : relativeTimeWithPlural$1\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\nvar translator = {\n    words: { //Different grammatical cases\n        m: ['jedan minut', 'jednog minuta'],\n        mm: ['minut', 'minuta', 'minuta'],\n        h: ['jedan sat', 'jednog sata'],\n        hh: ['sat', 'sata', 'sati'],\n        dd: ['dan', 'dana', 'dana'],\n        MM: ['mjesec', 'mjeseca', 'mjeseci'],\n        yy: ['godina', 'godine', 'godina']\n    },\n    correctGrammaticalCase: function (number, wordKey) {\n        return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n    },\n    translate: function (number, withoutSuffix, key) {\n        var wordKey = translator.words[key];\n        if (key.length === 1) {\n            return withoutSuffix ? wordKey[0] : wordKey[1];\n        } else {\n            return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n        }\n    }\n};\n\nhooks.defineLocale('me', {\n    months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n    monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n    monthsParseExact : true,\n    weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n    weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n    weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat: {\n        LT: 'H:mm',\n        LTS : 'H:mm:ss',\n        L: 'DD.MM.YYYY',\n        LL: 'D. MMMM YYYY',\n        LLL: 'D. MMMM YYYY H:mm',\n        LLLL: 'dddd, D. MMMM YYYY H:mm'\n    },\n    calendar: {\n        sameDay: '[danas u] LT',\n        nextDay: '[sjutra u] LT',\n\n        nextWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[u] [nedjelju] [u] LT';\n                case 3:\n                    return '[u] [srijedu] [u] LT';\n                case 6:\n                    return '[u] [subotu] [u] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[u] dddd [u] LT';\n            }\n        },\n        lastDay  : '[juče u] LT',\n        lastWeek : function () {\n            var lastWeekDays = [\n                '[prošle] [nedjelje] [u] LT',\n                '[prošlog] [ponedjeljka] [u] LT',\n                '[prošlog] [utorka] [u] LT',\n                '[prošle] [srijede] [u] LT',\n                '[prošlog] [četvrtka] [u] LT',\n                '[prošlog] [petka] [u] LT',\n                '[prošle] [subote] [u] LT'\n            ];\n            return lastWeekDays[this.day()];\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'za %s',\n        past   : 'prije %s',\n        s      : 'nekoliko sekundi',\n        m      : translator.translate,\n        mm     : translator.translate,\n        h      : translator.translate,\n        hh     : translator.translate,\n        d      : 'dan',\n        dd     : translator.translate,\n        M      : 'mjesec',\n        MM     : translator.translate,\n        y      : 'godinu',\n        yy     : translator.translate\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\nhooks.defineLocale('mi', {\n    months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),\n    monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),\n    monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n    monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n    monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n    monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n    weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n    weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n    weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n    longDateFormat: {\n        LT: 'HH:mm',\n        LTS: 'HH:mm:ss',\n        L: 'DD/MM/YYYY',\n        LL: 'D MMMM YYYY',\n        LLL: 'D MMMM YYYY [i] HH:mm',\n        LLLL: 'dddd, D MMMM YYYY [i] HH:mm'\n    },\n    calendar: {\n        sameDay: '[i teie mahana, i] LT',\n        nextDay: '[apopo i] LT',\n        nextWeek: 'dddd [i] LT',\n        lastDay: '[inanahi i] LT',\n        lastWeek: 'dddd [whakamutunga i] LT',\n        sameElse: 'L'\n    },\n    relativeTime: {\n        future: 'i roto i %s',\n        past: '%s i mua',\n        s: 'te hēkona ruarua',\n        m: 'he meneti',\n        mm: '%d meneti',\n        h: 'te haora',\n        hh: '%d haora',\n        d: 'he ra',\n        dd: '%d ra',\n        M: 'he marama',\n        MM: '%d marama',\n        y: 'he tau',\n        yy: '%d tau'\n    },\n    ordinalParse: /\\d{1,2}º/,\n    ordinal: '%dº',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n\nhooks.defineLocale('mk', {\n    months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),\n    monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n    weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),\n    weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n    weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'D.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY H:mm',\n        LLLL : 'dddd, D MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay : '[Денес во] LT',\n        nextDay : '[Утре во] LT',\n        nextWeek : '[Во] dddd [во] LT',\n        lastDay : '[Вчера во] LT',\n        lastWeek : function () {\n            switch (this.day()) {\n                case 0:\n                case 3:\n                case 6:\n                    return '[Изминатата] dddd [во] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[Изминатиот] dddd [во] LT';\n            }\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'после %s',\n        past : 'пред %s',\n        s : 'неколку секунди',\n        m : 'минута',\n        mm : '%d минути',\n        h : 'час',\n        hh : '%d часа',\n        d : 'ден',\n        dd : '%d дена',\n        M : 'месец',\n        MM : '%d месеци',\n        y : 'година',\n        yy : '%d години'\n    },\n    ordinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n    ordinal : function (number) {\n        var lastDigit = number % 10,\n            last2Digits = number % 100;\n        if (number === 0) {\n            return number + '-ев';\n        } else if (last2Digits === 0) {\n            return number + '-ен';\n        } else if (last2Digits > 10 && last2Digits < 20) {\n            return number + '-ти';\n        } else if (lastDigit === 1) {\n            return number + '-ви';\n        } else if (lastDigit === 2) {\n            return number + '-ри';\n        } else if (lastDigit === 7 || lastDigit === 8) {\n            return number + '-ми';\n        } else {\n            return number + '-ти';\n        }\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\nhooks.defineLocale('ml', {\n    months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),\n    monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),\n    weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n    weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n    longDateFormat : {\n        LT : 'A h:mm -നു',\n        LTS : 'A h:mm:ss -നു',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, A h:mm -നു',\n        LLLL : 'dddd, D MMMM YYYY, A h:mm -നു'\n    },\n    calendar : {\n        sameDay : '[ഇന്ന്] LT',\n        nextDay : '[നാളെ] LT',\n        nextWeek : 'dddd, LT',\n        lastDay : '[ഇന്നലെ] LT',\n        lastWeek : '[കഴിഞ്ഞ] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s കഴിഞ്ഞ്',\n        past : '%s മുൻപ്',\n        s : 'അൽപ നിമിഷങ്ങൾ',\n        m : 'ഒരു മിനിറ്റ്',\n        mm : '%d മിനിറ്റ്',\n        h : 'ഒരു മണിക്കൂർ',\n        hh : '%d മണിക്കൂർ',\n        d : 'ഒരു ദിവസം',\n        dd : '%d ദിവസം',\n        M : 'ഒരു മാസം',\n        MM : '%d മാസം',\n        y : 'ഒരു വർഷം',\n        yy : '%d വർഷം'\n    },\n    meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if ((meridiem === 'രാത്രി' && hour >= 4) ||\n                meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n                meridiem === 'വൈകുന്നേരം') {\n            return hour + 12;\n        } else {\n            return hour;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'രാത്രി';\n        } else if (hour < 12) {\n            return 'രാവിലെ';\n        } else if (hour < 17) {\n            return 'ഉച്ച കഴിഞ്ഞ്';\n        } else if (hour < 20) {\n            return 'വൈകുന്നേരം';\n        } else {\n            return 'രാത്രി';\n        }\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\nvar symbolMap$7 = {\n    '1': '१',\n    '2': '२',\n    '3': '३',\n    '4': '४',\n    '5': '५',\n    '6': '६',\n    '7': '७',\n    '8': '८',\n    '9': '९',\n    '0': '०'\n};\nvar numberMap$6 = {\n    '१': '1',\n    '२': '2',\n    '३': '3',\n    '४': '4',\n    '५': '5',\n    '६': '6',\n    '७': '7',\n    '८': '8',\n    '९': '9',\n    '०': '0'\n};\n\nfunction relativeTimeMr(number, withoutSuffix, string, isFuture)\n{\n    var output = '';\n    if (withoutSuffix) {\n        switch (string) {\n            case 's': output = 'काही सेकंद'; break;\n            case 'm': output = 'एक मिनिट'; break;\n            case 'mm': output = '%d मिनिटे'; break;\n            case 'h': output = 'एक तास'; break;\n            case 'hh': output = '%d तास'; break;\n            case 'd': output = 'एक दिवस'; break;\n            case 'dd': output = '%d दिवस'; break;\n            case 'M': output = 'एक महिना'; break;\n            case 'MM': output = '%d महिने'; break;\n            case 'y': output = 'एक वर्ष'; break;\n            case 'yy': output = '%d वर्षे'; break;\n        }\n    }\n    else {\n        switch (string) {\n            case 's': output = 'काही सेकंदां'; break;\n            case 'm': output = 'एका मिनिटा'; break;\n            case 'mm': output = '%d मिनिटां'; break;\n            case 'h': output = 'एका तासा'; break;\n            case 'hh': output = '%d तासां'; break;\n            case 'd': output = 'एका दिवसा'; break;\n            case 'dd': output = '%d दिवसां'; break;\n            case 'M': output = 'एका महिन्या'; break;\n            case 'MM': output = '%d महिन्यां'; break;\n            case 'y': output = 'एका वर्षा'; break;\n            case 'yy': output = '%d वर्षां'; break;\n        }\n    }\n    return output.replace(/%d/i, number);\n}\n\nhooks.defineLocale('mr', {\n    months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n    monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n    weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n    weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),\n    longDateFormat : {\n        LT : 'A h:mm वाजता',\n        LTS : 'A h:mm:ss वाजता',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, A h:mm वाजता',\n        LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता'\n    },\n    calendar : {\n        sameDay : '[आज] LT',\n        nextDay : '[उद्या] LT',\n        nextWeek : 'dddd, LT',\n        lastDay : '[काल] LT',\n        lastWeek: '[मागील] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future: '%sमध्ये',\n        past: '%sपूर्वी',\n        s: relativeTimeMr,\n        m: relativeTimeMr,\n        mm: relativeTimeMr,\n        h: relativeTimeMr,\n        hh: relativeTimeMr,\n        d: relativeTimeMr,\n        dd: relativeTimeMr,\n        M: relativeTimeMr,\n        MM: relativeTimeMr,\n        y: relativeTimeMr,\n        yy: relativeTimeMr\n    },\n    preparse: function (string) {\n        return string.replace(/[१२३४५६७८९०]/g, function (match) {\n            return numberMap$6[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$7[match];\n        });\n    },\n    meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'रात्री') {\n            return hour < 4 ? hour : hour + 12;\n        } else if (meridiem === 'सकाळी') {\n            return hour;\n        } else if (meridiem === 'दुपारी') {\n            return hour >= 10 ? hour : hour + 12;\n        } else if (meridiem === 'सायंकाळी') {\n            return hour + 12;\n        }\n    },\n    meridiem: function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'रात्री';\n        } else if (hour < 10) {\n            return 'सकाळी';\n        } else if (hour < 17) {\n            return 'दुपारी';\n        } else if (hour < 20) {\n            return 'सायंकाळी';\n        } else {\n            return 'रात्री';\n        }\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\nhooks.defineLocale('ms-my', {\n    months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n    monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n    weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n    weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n    weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n    longDateFormat : {\n        LT : 'HH.mm',\n        LTS : 'HH.mm.ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY [pukul] HH.mm',\n        LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n    },\n    meridiemParse: /pagi|tengahari|petang|malam/,\n    meridiemHour: function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'pagi') {\n            return hour;\n        } else if (meridiem === 'tengahari') {\n            return hour >= 11 ? hour : hour + 12;\n        } else if (meridiem === 'petang' || meridiem === 'malam') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 11) {\n            return 'pagi';\n        } else if (hours < 15) {\n            return 'tengahari';\n        } else if (hours < 19) {\n            return 'petang';\n        } else {\n            return 'malam';\n        }\n    },\n    calendar : {\n        sameDay : '[Hari ini pukul] LT',\n        nextDay : '[Esok pukul] LT',\n        nextWeek : 'dddd [pukul] LT',\n        lastDay : '[Kelmarin pukul] LT',\n        lastWeek : 'dddd [lepas pukul] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'dalam %s',\n        past : '%s yang lepas',\n        s : 'beberapa saat',\n        m : 'seminit',\n        mm : '%d minit',\n        h : 'sejam',\n        hh : '%d jam',\n        d : 'sehari',\n        dd : '%d hari',\n        M : 'sebulan',\n        MM : '%d bulan',\n        y : 'setahun',\n        yy : '%d tahun'\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\nhooks.defineLocale('ms', {\n    months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n    monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n    weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n    weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n    weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n    longDateFormat : {\n        LT : 'HH.mm',\n        LTS : 'HH.mm.ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY [pukul] HH.mm',\n        LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n    },\n    meridiemParse: /pagi|tengahari|petang|malam/,\n    meridiemHour: function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'pagi') {\n            return hour;\n        } else if (meridiem === 'tengahari') {\n            return hour >= 11 ? hour : hour + 12;\n        } else if (meridiem === 'petang' || meridiem === 'malam') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 11) {\n            return 'pagi';\n        } else if (hours < 15) {\n            return 'tengahari';\n        } else if (hours < 19) {\n            return 'petang';\n        } else {\n            return 'malam';\n        }\n    },\n    calendar : {\n        sameDay : '[Hari ini pukul] LT',\n        nextDay : '[Esok pukul] LT',\n        nextWeek : 'dddd [pukul] LT',\n        lastDay : '[Kelmarin pukul] LT',\n        lastWeek : 'dddd [lepas pukul] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'dalam %s',\n        past : '%s yang lepas',\n        s : 'beberapa saat',\n        m : 'seminit',\n        mm : '%d minit',\n        h : 'sejam',\n        hh : '%d jam',\n        d : 'sehari',\n        dd : '%d hari',\n        M : 'sebulan',\n        MM : '%d bulan',\n        y : 'setahun',\n        yy : '%d tahun'\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\nvar symbolMap$8 = {\n    '1': '၁',\n    '2': '၂',\n    '3': '၃',\n    '4': '၄',\n    '5': '၅',\n    '6': '၆',\n    '7': '၇',\n    '8': '၈',\n    '9': '၉',\n    '0': '၀'\n};\nvar numberMap$7 = {\n    '၁': '1',\n    '၂': '2',\n    '၃': '3',\n    '၄': '4',\n    '၅': '5',\n    '၆': '6',\n    '၇': '7',\n    '၈': '8',\n    '၉': '9',\n    '၀': '0'\n};\n\nhooks.defineLocale('my', {\n    months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),\n    monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n    weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),\n    weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n    weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n    longDateFormat: {\n        LT: 'HH:mm',\n        LTS: 'HH:mm:ss',\n        L: 'DD/MM/YYYY',\n        LL: 'D MMMM YYYY',\n        LLL: 'D MMMM YYYY HH:mm',\n        LLLL: 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar: {\n        sameDay: '[ယနေ.] LT [မှာ]',\n        nextDay: '[မနက်ဖြန်] LT [မှာ]',\n        nextWeek: 'dddd LT [မှာ]',\n        lastDay: '[မနေ.က] LT [မှာ]',\n        lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n        sameElse: 'L'\n    },\n    relativeTime: {\n        future: 'လာမည့် %s မှာ',\n        past: 'လွန်ခဲ့သော %s က',\n        s: 'စက္ကန်.အနည်းငယ်',\n        m: 'တစ်မိနစ်',\n        mm: '%d မိနစ်',\n        h: 'တစ်နာရီ',\n        hh: '%d နာရီ',\n        d: 'တစ်ရက်',\n        dd: '%d ရက်',\n        M: 'တစ်လ',\n        MM: '%d လ',\n        y: 'တစ်နှစ်',\n        yy: '%d နှစ်'\n    },\n    preparse: function (string) {\n        return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n            return numberMap$7[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$8[match];\n        });\n    },\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4 // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//!           Sigurd Gartmann : https://github.com/sigurdga\n\nhooks.defineLocale('nb', {\n    months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n    monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n    weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n    weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY [kl.] HH:mm',\n        LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'\n    },\n    calendar : {\n        sameDay: '[i dag kl.] LT',\n        nextDay: '[i morgen kl.] LT',\n        nextWeek: 'dddd [kl.] LT',\n        lastDay: '[i går kl.] LT',\n        lastWeek: '[forrige] dddd [kl.] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'om %s',\n        past : '%s siden',\n        s : 'noen sekunder',\n        m : 'ett minutt',\n        mm : '%d minutter',\n        h : 'en time',\n        hh : '%d timer',\n        d : 'en dag',\n        dd : '%d dager',\n        M : 'en måned',\n        MM : '%d måneder',\n        y : 'ett år',\n        yy : '%d år'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\nvar symbolMap$9 = {\n    '1': '१',\n    '2': '२',\n    '3': '३',\n    '4': '४',\n    '5': '५',\n    '6': '६',\n    '7': '७',\n    '8': '८',\n    '9': '९',\n    '0': '०'\n};\nvar numberMap$8 = {\n    '१': '1',\n    '२': '2',\n    '३': '3',\n    '४': '4',\n    '५': '5',\n    '६': '6',\n    '७': '7',\n    '८': '8',\n    '९': '9',\n    '०': '0'\n};\n\nhooks.defineLocale('ne', {\n    months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),\n    monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),\n    weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n    weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'Aको h:mm बजे',\n        LTS : 'Aको h:mm:ss बजे',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, Aको h:mm बजे',\n        LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे'\n    },\n    preparse: function (string) {\n        return string.replace(/[१२३४५६७८९०]/g, function (match) {\n            return numberMap$8[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$9[match];\n        });\n    },\n    meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'राति') {\n            return hour < 4 ? hour : hour + 12;\n        } else if (meridiem === 'बिहान') {\n            return hour;\n        } else if (meridiem === 'दिउँसो') {\n            return hour >= 10 ? hour : hour + 12;\n        } else if (meridiem === 'साँझ') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 3) {\n            return 'राति';\n        } else if (hour < 12) {\n            return 'बिहान';\n        } else if (hour < 16) {\n            return 'दिउँसो';\n        } else if (hour < 20) {\n            return 'साँझ';\n        } else {\n            return 'राति';\n        }\n    },\n    calendar : {\n        sameDay : '[आज] LT',\n        nextDay : '[भोलि] LT',\n        nextWeek : '[आउँदो] dddd[,] LT',\n        lastDay : '[हिजो] LT',\n        lastWeek : '[गएको] dddd[,] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%sमा',\n        past : '%s अगाडि',\n        s : 'केही क्षण',\n        m : 'एक मिनेट',\n        mm : '%d मिनेट',\n        h : 'एक घण्टा',\n        hh : '%d घण्टा',\n        d : 'एक दिन',\n        dd : '%d दिन',\n        M : 'एक महिना',\n        MM : '%d महिना',\n        y : 'एक बर्ष',\n        yy : '%d बर्ष'\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\nvar monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');\nvar monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n\nvar monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\nvar monthsRegex$1 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\nhooks.defineLocale('nl-be', {\n    months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n    monthsShort : function (m, format) {\n        if (/-MMM-/.test(format)) {\n            return monthsShortWithoutDots$1[m.month()];\n        } else {\n            return monthsShortWithDots$1[m.month()];\n        }\n    },\n\n    monthsRegex: monthsRegex$1,\n    monthsShortRegex: monthsRegex$1,\n    monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,\n    monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n    monthsParse : monthsParse,\n    longMonthsParse : monthsParse,\n    shortMonthsParse : monthsParse,\n\n    weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n    weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),\n    weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[vandaag om] LT',\n        nextDay: '[morgen om] LT',\n        nextWeek: 'dddd [om] LT',\n        lastDay: '[gisteren om] LT',\n        lastWeek: '[afgelopen] dddd [om] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'over %s',\n        past : '%s geleden',\n        s : 'een paar seconden',\n        m : 'één minuut',\n        mm : '%d minuten',\n        h : 'één uur',\n        hh : '%d uur',\n        d : 'één dag',\n        dd : '%d dagen',\n        M : 'één maand',\n        MM : '%d maanden',\n        y : 'één jaar',\n        yy : '%d jaar'\n    },\n    ordinalParse: /\\d{1,2}(ste|de)/,\n    ordinal : function (number) {\n        return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\nvar monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');\nvar monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n\nvar monthsParse$1 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\nvar monthsRegex$2 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\nhooks.defineLocale('nl', {\n    months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n    monthsShort : function (m, format) {\n        if (/-MMM-/.test(format)) {\n            return monthsShortWithoutDots$2[m.month()];\n        } else {\n            return monthsShortWithDots$2[m.month()];\n        }\n    },\n\n    monthsRegex: monthsRegex$2,\n    monthsShortRegex: monthsRegex$2,\n    monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,\n    monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n    monthsParse : monthsParse$1,\n    longMonthsParse : monthsParse$1,\n    shortMonthsParse : monthsParse$1,\n\n    weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n    weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),\n    weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD-MM-YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[vandaag om] LT',\n        nextDay: '[morgen om] LT',\n        nextWeek: 'dddd [om] LT',\n        lastDay: '[gisteren om] LT',\n        lastWeek: '[afgelopen] dddd [om] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'over %s',\n        past : '%s geleden',\n        s : 'een paar seconden',\n        m : 'één minuut',\n        mm : '%d minuten',\n        h : 'één uur',\n        hh : '%d uur',\n        d : 'één dag',\n        dd : '%d dagen',\n        M : 'één maand',\n        MM : '%d maanden',\n        y : 'één jaar',\n        yy : '%d jaar'\n    },\n    ordinalParse: /\\d{1,2}(ste|de)/,\n    ordinal : function (number) {\n        return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! author : https://github.com/mechuwind\n\nhooks.defineLocale('nn', {\n    months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n    monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n    weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n    weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),\n    weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY [kl.] H:mm',\n        LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'\n    },\n    calendar : {\n        sameDay: '[I dag klokka] LT',\n        nextDay: '[I morgon klokka] LT',\n        nextWeek: 'dddd [klokka] LT',\n        lastDay: '[I går klokka] LT',\n        lastWeek: '[Føregåande] dddd [klokka] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'om %s',\n        past : '%s sidan',\n        s : 'nokre sekund',\n        m : 'eit minutt',\n        mm : '%d minutt',\n        h : 'ein time',\n        hh : '%d timar',\n        d : 'ein dag',\n        dd : '%d dagar',\n        M : 'ein månad',\n        MM : '%d månader',\n        y : 'eit år',\n        yy : '%d år'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\nvar symbolMap$10 = {\n    '1': '੧',\n    '2': '੨',\n    '3': '੩',\n    '4': '੪',\n    '5': '੫',\n    '6': '੬',\n    '7': '੭',\n    '8': '੮',\n    '9': '੯',\n    '0': '੦'\n};\nvar numberMap$9 = {\n    '੧': '1',\n    '੨': '2',\n    '੩': '3',\n    '੪': '4',\n    '੫': '5',\n    '੬': '6',\n    '੭': '7',\n    '੮': '8',\n    '੯': '9',\n    '੦': '0'\n};\n\nhooks.defineLocale('pa-in', {\n    // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.\n    months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n    monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n    weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),\n    weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n    weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n    longDateFormat : {\n        LT : 'A h:mm ਵਜੇ',\n        LTS : 'A h:mm:ss ਵਜੇ',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, A h:mm ਵਜੇ',\n        LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'\n    },\n    calendar : {\n        sameDay : '[ਅਜ] LT',\n        nextDay : '[ਕਲ] LT',\n        nextWeek : 'dddd, LT',\n        lastDay : '[ਕਲ] LT',\n        lastWeek : '[ਪਿਛਲੇ] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s ਵਿੱਚ',\n        past : '%s ਪਿਛਲੇ',\n        s : 'ਕੁਝ ਸਕਿੰਟ',\n        m : 'ਇਕ ਮਿੰਟ',\n        mm : '%d ਮਿੰਟ',\n        h : 'ਇੱਕ ਘੰਟਾ',\n        hh : '%d ਘੰਟੇ',\n        d : 'ਇੱਕ ਦਿਨ',\n        dd : '%d ਦਿਨ',\n        M : 'ਇੱਕ ਮਹੀਨਾ',\n        MM : '%d ਮਹੀਨੇ',\n        y : 'ਇੱਕ ਸਾਲ',\n        yy : '%d ਸਾਲ'\n    },\n    preparse: function (string) {\n        return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n            return numberMap$9[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$10[match];\n        });\n    },\n    // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n    // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n    meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'ਰਾਤ') {\n            return hour < 4 ? hour : hour + 12;\n        } else if (meridiem === 'ਸਵੇਰ') {\n            return hour;\n        } else if (meridiem === 'ਦੁਪਹਿਰ') {\n            return hour >= 10 ? hour : hour + 12;\n        } else if (meridiem === 'ਸ਼ਾਮ') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'ਰਾਤ';\n        } else if (hour < 10) {\n            return 'ਸਵੇਰ';\n        } else if (hour < 17) {\n            return 'ਦੁਪਹਿਰ';\n        } else if (hour < 20) {\n            return 'ਸ਼ਾਮ';\n        } else {\n            return 'ਰਾਤ';\n        }\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\nvar monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');\nvar monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');\nfunction plural$3(n) {\n    return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);\n}\nfunction translate$7(number, withoutSuffix, key) {\n    var result = number + ' ';\n    switch (key) {\n        case 'm':\n            return withoutSuffix ? 'minuta' : 'minutę';\n        case 'mm':\n            return result + (plural$3(number) ? 'minuty' : 'minut');\n        case 'h':\n            return withoutSuffix  ? 'godzina'  : 'godzinę';\n        case 'hh':\n            return result + (plural$3(number) ? 'godziny' : 'godzin');\n        case 'MM':\n            return result + (plural$3(number) ? 'miesiące' : 'miesięcy');\n        case 'yy':\n            return result + (plural$3(number) ? 'lata' : 'lat');\n    }\n}\n\nhooks.defineLocale('pl', {\n    months : function (momentToFormat, format) {\n        if (format === '') {\n            // Hack: if format empty we know this is used to generate\n            // RegExp by moment. Give then back both valid forms of months\n            // in RegExp ready format.\n            return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';\n        } else if (/D MMMM/.test(format)) {\n            return monthsSubjective[momentToFormat.month()];\n        } else {\n            return monthsNominative[momentToFormat.month()];\n        }\n    },\n    monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n    weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n    weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n    weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Dziś o] LT',\n        nextDay: '[Jutro o] LT',\n        nextWeek: '[W] dddd [o] LT',\n        lastDay: '[Wczoraj o] LT',\n        lastWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[W zeszłą niedzielę o] LT';\n                case 3:\n                    return '[W zeszłą środę o] LT';\n                case 6:\n                    return '[W zeszłą sobotę o] LT';\n                default:\n                    return '[W zeszły] dddd [o] LT';\n            }\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'za %s',\n        past : '%s temu',\n        s : 'kilka sekund',\n        m : translate$7,\n        mm : translate$7,\n        h : translate$7,\n        hh : translate$7,\n        d : '1 dzień',\n        dd : '%d dni',\n        M : 'miesiąc',\n        MM : translate$7,\n        y : 'rok',\n        yy : translate$7\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\nhooks.defineLocale('pt-br', {\n    months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n    monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n    weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),\n    weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n    weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D [de] MMMM [de] YYYY',\n        LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',\n        LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'\n    },\n    calendar : {\n        sameDay: '[Hoje às] LT',\n        nextDay: '[Amanhã às] LT',\n        nextWeek: 'dddd [às] LT',\n        lastDay: '[Ontem às] LT',\n        lastWeek: function () {\n            return (this.day() === 0 || this.day() === 6) ?\n                '[Último] dddd [às] LT' : // Saturday + Sunday\n                '[Última] dddd [às] LT'; // Monday - Friday\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'em %s',\n        past : '%s atrás',\n        s : 'poucos segundos',\n        m : 'um minuto',\n        mm : '%d minutos',\n        h : 'uma hora',\n        hh : '%d horas',\n        d : 'um dia',\n        dd : '%d dias',\n        M : 'um mês',\n        MM : '%d meses',\n        y : 'um ano',\n        yy : '%d anos'\n    },\n    ordinalParse: /\\d{1,2}º/,\n    ordinal : '%dº'\n});\n\n//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\nhooks.defineLocale('pt', {\n    months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n    monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n    weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),\n    weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n    weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D [de] MMMM [de] YYYY',\n        LLL : 'D [de] MMMM [de] YYYY HH:mm',\n        LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Hoje às] LT',\n        nextDay: '[Amanhã às] LT',\n        nextWeek: 'dddd [às] LT',\n        lastDay: '[Ontem às] LT',\n        lastWeek: function () {\n            return (this.day() === 0 || this.day() === 6) ?\n                '[Último] dddd [às] LT' : // Saturday + Sunday\n                '[Última] dddd [às] LT'; // Monday - Friday\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'em %s',\n        past : 'há %s',\n        s : 'segundos',\n        m : 'um minuto',\n        mm : '%d minutos',\n        h : 'uma hora',\n        hh : '%d horas',\n        d : 'um dia',\n        dd : '%d dias',\n        M : 'um mês',\n        MM : '%d meses',\n        y : 'um ano',\n        yy : '%d anos'\n    },\n    ordinalParse: /\\d{1,2}º/,\n    ordinal : '%dº',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n\nfunction relativeTimeWithPlural$2(number, withoutSuffix, key) {\n    var format = {\n            'mm': 'minute',\n            'hh': 'ore',\n            'dd': 'zile',\n            'MM': 'luni',\n            'yy': 'ani'\n        },\n        separator = ' ';\n    if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n        separator = ' de ';\n    }\n    return number + separator + format[key];\n}\n\nhooks.defineLocale('ro', {\n    months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),\n    monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),\n    monthsParseExact: true,\n    weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n    weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n    weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY H:mm',\n        LLLL : 'dddd, D MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay: '[azi la] LT',\n        nextDay: '[mâine la] LT',\n        nextWeek: 'dddd [la] LT',\n        lastDay: '[ieri la] LT',\n        lastWeek: '[fosta] dddd [la] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'peste %s',\n        past : '%s în urmă',\n        s : 'câteva secunde',\n        m : 'un minut',\n        mm : relativeTimeWithPlural$2,\n        h : 'o oră',\n        hh : relativeTimeWithPlural$2,\n        d : 'o zi',\n        dd : relativeTimeWithPlural$2,\n        M : 'o lună',\n        MM : relativeTimeWithPlural$2,\n        y : 'un an',\n        yy : relativeTimeWithPlural$2\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\nfunction plural$4(word, num) {\n    var forms = word.split('_');\n    return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n}\nfunction relativeTimeWithPlural$3(number, withoutSuffix, key) {\n    var format = {\n        'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n        'hh': 'час_часа_часов',\n        'dd': 'день_дня_дней',\n        'MM': 'месяц_месяца_месяцев',\n        'yy': 'год_года_лет'\n    };\n    if (key === 'm') {\n        return withoutSuffix ? 'минута' : 'минуту';\n    }\n    else {\n        return number + ' ' + plural$4(format[key], +number);\n    }\n}\nvar monthsParse$2 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];\n\n// http://new.gramota.ru/spravka/rules/139-prop : § 103\n// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n// CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\nhooks.defineLocale('ru', {\n    months : {\n        format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),\n        standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')\n    },\n    monthsShort : {\n        // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку ?\n        format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),\n        standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')\n    },\n    weekdays : {\n        standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),\n        format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),\n        isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\\] ?dddd/\n    },\n    weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n    weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n    monthsParse : monthsParse$2,\n    longMonthsParse : monthsParse$2,\n    shortMonthsParse : monthsParse$2,\n\n    // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n    monthsRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n    // копия предыдущего\n    monthsShortRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n    // полные названия с падежами\n    monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n    // Выражение, которое соотвествует только сокращённым формам\n    monthsShortStrictRegex: /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY г.',\n        LLL : 'D MMMM YYYY г., HH:mm',\n        LLLL : 'dddd, D MMMM YYYY г., HH:mm'\n    },\n    calendar : {\n        sameDay: '[Сегодня в] LT',\n        nextDay: '[Завтра в] LT',\n        lastDay: '[Вчера в] LT',\n        nextWeek: function (now) {\n            if (now.week() !== this.week()) {\n                switch (this.day()) {\n                    case 0:\n                        return '[В следующее] dddd [в] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                        return '[В следующий] dddd [в] LT';\n                    case 3:\n                    case 5:\n                    case 6:\n                        return '[В следующую] dddd [в] LT';\n                }\n            } else {\n                if (this.day() === 2) {\n                    return '[Во] dddd [в] LT';\n                } else {\n                    return '[В] dddd [в] LT';\n                }\n            }\n        },\n        lastWeek: function (now) {\n            if (now.week() !== this.week()) {\n                switch (this.day()) {\n                    case 0:\n                        return '[В прошлое] dddd [в] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                        return '[В прошлый] dddd [в] LT';\n                    case 3:\n                    case 5:\n                    case 6:\n                        return '[В прошлую] dddd [в] LT';\n                }\n            } else {\n                if (this.day() === 2) {\n                    return '[Во] dddd [в] LT';\n                } else {\n                    return '[В] dddd [в] LT';\n                }\n            }\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'через %s',\n        past : '%s назад',\n        s : 'несколько секунд',\n        m : relativeTimeWithPlural$3,\n        mm : relativeTimeWithPlural$3,\n        h : 'час',\n        hh : relativeTimeWithPlural$3,\n        d : 'день',\n        dd : relativeTimeWithPlural$3,\n        M : 'месяц',\n        MM : relativeTimeWithPlural$3,\n        y : 'год',\n        yy : relativeTimeWithPlural$3\n    },\n    meridiemParse: /ночи|утра|дня|вечера/i,\n    isPM : function (input) {\n        return /^(дня|вечера)$/.test(input);\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'ночи';\n        } else if (hour < 12) {\n            return 'утра';\n        } else if (hour < 17) {\n            return 'дня';\n        } else {\n            return 'вечера';\n        }\n    },\n    ordinalParse: /\\d{1,2}-(й|го|я)/,\n    ordinal: function (number, period) {\n        switch (period) {\n            case 'M':\n            case 'd':\n            case 'DDD':\n                return number + '-й';\n            case 'D':\n                return number + '-го';\n            case 'w':\n            case 'W':\n                return number + '-я';\n            default:\n                return number;\n        }\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n\nhooks.defineLocale('se', {\n    months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),\n    monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n    weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),\n    weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n    weekdaysMin : 's_v_m_g_d_b_L'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'MMMM D. [b.] YYYY',\n        LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm',\n        LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'\n    },\n    calendar : {\n        sameDay: '[otne ti] LT',\n        nextDay: '[ihttin ti] LT',\n        nextWeek: 'dddd [ti] LT',\n        lastDay: '[ikte ti] LT',\n        lastWeek: '[ovddit] dddd [ti] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : '%s geažes',\n        past : 'maŋit %s',\n        s : 'moadde sekunddat',\n        m : 'okta minuhta',\n        mm : '%d minuhtat',\n        h : 'okta diimmu',\n        hh : '%d diimmut',\n        d : 'okta beaivi',\n        dd : '%d beaivvit',\n        M : 'okta mánnu',\n        MM : '%d mánut',\n        y : 'okta jahki',\n        yy : '%d jagit'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n/*jshint -W100*/\nhooks.defineLocale('si', {\n    months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),\n    monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),\n    weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),\n    weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n    weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'a h:mm',\n        LTS : 'a h:mm:ss',\n        L : 'YYYY/MM/DD',\n        LL : 'YYYY MMMM D',\n        LLL : 'YYYY MMMM D, a h:mm',\n        LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'\n    },\n    calendar : {\n        sameDay : '[අද] LT[ට]',\n        nextDay : '[හෙට] LT[ට]',\n        nextWeek : 'dddd LT[ට]',\n        lastDay : '[ඊයේ] LT[ට]',\n        lastWeek : '[පසුගිය] dddd LT[ට]',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%sකින්',\n        past : '%sකට පෙර',\n        s : 'තත්පර කිහිපය',\n        m : 'මිනිත්තුව',\n        mm : 'මිනිත්තු %d',\n        h : 'පැය',\n        hh : 'පැය %d',\n        d : 'දිනය',\n        dd : 'දින %d',\n        M : 'මාසය',\n        MM : 'මාස %d',\n        y : 'වසර',\n        yy : 'වසර %d'\n    },\n    ordinalParse: /\\d{1,2} වැනි/,\n    ordinal : function (number) {\n        return number + ' වැනි';\n    },\n    meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n    isPM : function (input) {\n        return input === 'ප.ව.' || input === 'පස් වරු';\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'ප.ව.' : 'පස් වරු';\n        } else {\n            return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n        }\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\nvar months$6 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');\nvar monthsShort$4 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\nfunction plural$5(n) {\n    return (n > 1) && (n < 5);\n}\nfunction translate$8(number, withoutSuffix, key, isFuture) {\n    var result = number + ' ';\n    switch (key) {\n        case 's':  // a few seconds / in a few seconds / a few seconds ago\n            return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';\n        case 'm':  // a minute / in a minute / a minute ago\n            return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');\n        case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$5(number) ? 'minúty' : 'minút');\n            } else {\n                return result + 'minútami';\n            }\n            break;\n        case 'h':  // an hour / in an hour / an hour ago\n            return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n        case 'hh': // 9 hours / in 9 hours / 9 hours ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$5(number) ? 'hodiny' : 'hodín');\n            } else {\n                return result + 'hodinami';\n            }\n            break;\n        case 'd':  // a day / in a day / a day ago\n            return (withoutSuffix || isFuture) ? 'deň' : 'dňom';\n        case 'dd': // 9 days / in 9 days / 9 days ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$5(number) ? 'dni' : 'dní');\n            } else {\n                return result + 'dňami';\n            }\n            break;\n        case 'M':  // a month / in a month / a month ago\n            return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';\n        case 'MM': // 9 months / in 9 months / 9 months ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$5(number) ? 'mesiace' : 'mesiacov');\n            } else {\n                return result + 'mesiacmi';\n            }\n            break;\n        case 'y':  // a year / in a year / a year ago\n            return (withoutSuffix || isFuture) ? 'rok' : 'rokom';\n        case 'yy': // 9 years / in 9 years / 9 years ago\n            if (withoutSuffix || isFuture) {\n                return result + (plural$5(number) ? 'roky' : 'rokov');\n            } else {\n                return result + 'rokmi';\n            }\n            break;\n    }\n}\n\nhooks.defineLocale('sk', {\n    months : months$6,\n    monthsShort : monthsShort$4,\n    weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n    weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),\n    weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),\n    longDateFormat : {\n        LT: 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY H:mm',\n        LLLL : 'dddd D. MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay: '[dnes o] LT',\n        nextDay: '[zajtra o] LT',\n        nextWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[v nedeľu o] LT';\n                case 1:\n                case 2:\n                    return '[v] dddd [o] LT';\n                case 3:\n                    return '[v stredu o] LT';\n                case 4:\n                    return '[vo štvrtok o] LT';\n                case 5:\n                    return '[v piatok o] LT';\n                case 6:\n                    return '[v sobotu o] LT';\n            }\n        },\n        lastDay: '[včera o] LT',\n        lastWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[minulú nedeľu o] LT';\n                case 1:\n                case 2:\n                    return '[minulý] dddd [o] LT';\n                case 3:\n                    return '[minulú stredu o] LT';\n                case 4:\n                case 5:\n                    return '[minulý] dddd [o] LT';\n                case 6:\n                    return '[minulú sobotu o] LT';\n            }\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'za %s',\n        past : 'pred %s',\n        s : translate$8,\n        m : translate$8,\n        mm : translate$8,\n        h : translate$8,\n        hh : translate$8,\n        d : translate$8,\n        dd : translate$8,\n        M : translate$8,\n        MM : translate$8,\n        y : translate$8,\n        yy : translate$8\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\nfunction processRelativeTime$4(number, withoutSuffix, key, isFuture) {\n    var result = number + ' ';\n    switch (key) {\n        case 's':\n            return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n        case 'm':\n            return withoutSuffix ? 'ena minuta' : 'eno minuto';\n        case 'mm':\n            if (number === 1) {\n                result += withoutSuffix ? 'minuta' : 'minuto';\n            } else if (number === 2) {\n                result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n            } else if (number < 5) {\n                result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n            } else {\n                result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n            }\n            return result;\n        case 'h':\n            return withoutSuffix ? 'ena ura' : 'eno uro';\n        case 'hh':\n            if (number === 1) {\n                result += withoutSuffix ? 'ura' : 'uro';\n            } else if (number === 2) {\n                result += withoutSuffix || isFuture ? 'uri' : 'urama';\n            } else if (number < 5) {\n                result += withoutSuffix || isFuture ? 'ure' : 'urami';\n            } else {\n                result += withoutSuffix || isFuture ? 'ur' : 'urami';\n            }\n            return result;\n        case 'd':\n            return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n        case 'dd':\n            if (number === 1) {\n                result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n            } else if (number === 2) {\n                result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n            } else {\n                result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n            }\n            return result;\n        case 'M':\n            return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n        case 'MM':\n            if (number === 1) {\n                result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n            } else if (number === 2) {\n                result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n            } else if (number < 5) {\n                result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n            } else {\n                result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n            }\n            return result;\n        case 'y':\n            return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n        case 'yy':\n            if (number === 1) {\n                result += withoutSuffix || isFuture ? 'leto' : 'letom';\n            } else if (number === 2) {\n                result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n            } else if (number < 5) {\n                result += withoutSuffix || isFuture ? 'leta' : 'leti';\n            } else {\n                result += withoutSuffix || isFuture ? 'let' : 'leti';\n            }\n            return result;\n    }\n}\n\nhooks.defineLocale('sl', {\n    months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),\n    monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),\n    monthsParseExact: true,\n    weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n    weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n    weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM YYYY',\n        LLL : 'D. MMMM YYYY H:mm',\n        LLLL : 'dddd, D. MMMM YYYY H:mm'\n    },\n    calendar : {\n        sameDay  : '[danes ob] LT',\n        nextDay  : '[jutri ob] LT',\n\n        nextWeek : function () {\n            switch (this.day()) {\n                case 0:\n                    return '[v] [nedeljo] [ob] LT';\n                case 3:\n                    return '[v] [sredo] [ob] LT';\n                case 6:\n                    return '[v] [soboto] [ob] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[v] dddd [ob] LT';\n            }\n        },\n        lastDay  : '[včeraj ob] LT',\n        lastWeek : function () {\n            switch (this.day()) {\n                case 0:\n                    return '[prejšnjo] [nedeljo] [ob] LT';\n                case 3:\n                    return '[prejšnjo] [sredo] [ob] LT';\n                case 6:\n                    return '[prejšnjo] [soboto] [ob] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[prejšnji] dddd [ob] LT';\n            }\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'čez %s',\n        past   : 'pred %s',\n        s      : processRelativeTime$4,\n        m      : processRelativeTime$4,\n        mm     : processRelativeTime$4,\n        h      : processRelativeTime$4,\n        hh     : processRelativeTime$4,\n        d      : processRelativeTime$4,\n        dd     : processRelativeTime$4,\n        M      : processRelativeTime$4,\n        MM     : processRelativeTime$4,\n        y      : processRelativeTime$4,\n        yy     : processRelativeTime$4\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\nhooks.defineLocale('sq', {\n    months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),\n    monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n    weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),\n    weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n    weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'),\n    weekdaysParseExact : true,\n    meridiemParse: /PD|MD/,\n    isPM: function (input) {\n        return input.charAt(0) === 'M';\n    },\n    meridiem : function (hours, minutes, isLower) {\n        return hours < 12 ? 'PD' : 'MD';\n    },\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[Sot në] LT',\n        nextDay : '[Nesër në] LT',\n        nextWeek : 'dddd [në] LT',\n        lastDay : '[Dje në] LT',\n        lastWeek : 'dddd [e kaluar në] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'në %s',\n        past : '%s më parë',\n        s : 'disa sekonda',\n        m : 'një minutë',\n        mm : '%d minuta',\n        h : 'një orë',\n        hh : '%d orë',\n        d : 'një ditë',\n        dd : '%d ditë',\n        M : 'një muaj',\n        MM : '%d muaj',\n        y : 'një vit',\n        yy : '%d vite'\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n\nvar translator$1 = {\n    words: { //Different grammatical cases\n        m: ['један минут', 'једне минуте'],\n        mm: ['минут', 'минуте', 'минута'],\n        h: ['један сат', 'једног сата'],\n        hh: ['сат', 'сата', 'сати'],\n        dd: ['дан', 'дана', 'дана'],\n        MM: ['месец', 'месеца', 'месеци'],\n        yy: ['година', 'године', 'година']\n    },\n    correctGrammaticalCase: function (number, wordKey) {\n        return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n    },\n    translate: function (number, withoutSuffix, key) {\n        var wordKey = translator$1.words[key];\n        if (key.length === 1) {\n            return withoutSuffix ? wordKey[0] : wordKey[1];\n        } else {\n            return number + ' ' + translator$1.correctGrammaticalCase(number, wordKey);\n        }\n    }\n};\n\nhooks.defineLocale('sr-cyrl', {\n    months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),\n    monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n    monthsParseExact: true,\n    weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n    weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n    weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat: {\n        LT: 'H:mm',\n        LTS : 'H:mm:ss',\n        L: 'DD.MM.YYYY',\n        LL: 'D. MMMM YYYY',\n        LLL: 'D. MMMM YYYY H:mm',\n        LLLL: 'dddd, D. MMMM YYYY H:mm'\n    },\n    calendar: {\n        sameDay: '[данас у] LT',\n        nextDay: '[сутра у] LT',\n        nextWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[у] [недељу] [у] LT';\n                case 3:\n                    return '[у] [среду] [у] LT';\n                case 6:\n                    return '[у] [суботу] [у] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[у] dddd [у] LT';\n            }\n        },\n        lastDay  : '[јуче у] LT',\n        lastWeek : function () {\n            var lastWeekDays = [\n                '[прошле] [недеље] [у] LT',\n                '[прошлог] [понедељка] [у] LT',\n                '[прошлог] [уторка] [у] LT',\n                '[прошле] [среде] [у] LT',\n                '[прошлог] [четвртка] [у] LT',\n                '[прошлог] [петка] [у] LT',\n                '[прошле] [суботе] [у] LT'\n            ];\n            return lastWeekDays[this.day()];\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'за %s',\n        past   : 'пре %s',\n        s      : 'неколико секунди',\n        m      : translator$1.translate,\n        mm     : translator$1.translate,\n        h      : translator$1.translate,\n        hh     : translator$1.translate,\n        d      : 'дан',\n        dd     : translator$1.translate,\n        M      : 'месец',\n        MM     : translator$1.translate,\n        y      : 'годину',\n        yy     : translator$1.translate\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n\nvar translator$2 = {\n    words: { //Different grammatical cases\n        m: ['jedan minut', 'jedne minute'],\n        mm: ['minut', 'minute', 'minuta'],\n        h: ['jedan sat', 'jednog sata'],\n        hh: ['sat', 'sata', 'sati'],\n        dd: ['dan', 'dana', 'dana'],\n        MM: ['mesec', 'meseca', 'meseci'],\n        yy: ['godina', 'godine', 'godina']\n    },\n    correctGrammaticalCase: function (number, wordKey) {\n        return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n    },\n    translate: function (number, withoutSuffix, key) {\n        var wordKey = translator$2.words[key];\n        if (key.length === 1) {\n            return withoutSuffix ? wordKey[0] : wordKey[1];\n        } else {\n            return number + ' ' + translator$2.correctGrammaticalCase(number, wordKey);\n        }\n    }\n};\n\nhooks.defineLocale('sr', {\n    months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n    monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n    monthsParseExact: true,\n    weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),\n    weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n    weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat: {\n        LT: 'H:mm',\n        LTS : 'H:mm:ss',\n        L: 'DD.MM.YYYY',\n        LL: 'D. MMMM YYYY',\n        LLL: 'D. MMMM YYYY H:mm',\n        LLLL: 'dddd, D. MMMM YYYY H:mm'\n    },\n    calendar: {\n        sameDay: '[danas u] LT',\n        nextDay: '[sutra u] LT',\n        nextWeek: function () {\n            switch (this.day()) {\n                case 0:\n                    return '[u] [nedelju] [u] LT';\n                case 3:\n                    return '[u] [sredu] [u] LT';\n                case 6:\n                    return '[u] [subotu] [u] LT';\n                case 1:\n                case 2:\n                case 4:\n                case 5:\n                    return '[u] dddd [u] LT';\n            }\n        },\n        lastDay  : '[juče u] LT',\n        lastWeek : function () {\n            var lastWeekDays = [\n                '[prošle] [nedelje] [u] LT',\n                '[prošlog] [ponedeljka] [u] LT',\n                '[prošlog] [utorka] [u] LT',\n                '[prošle] [srede] [u] LT',\n                '[prošlog] [četvrtka] [u] LT',\n                '[prošlog] [petka] [u] LT',\n                '[prošle] [subote] [u] LT'\n            ];\n            return lastWeekDays[this.day()];\n        },\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'za %s',\n        past   : 'pre %s',\n        s      : 'nekoliko sekundi',\n        m      : translator$2.translate,\n        mm     : translator$2.translate,\n        h      : translator$2.translate,\n        hh     : translator$2.translate,\n        d      : 'dan',\n        dd     : translator$2.translate,\n        M      : 'mesec',\n        MM     : translator$2.translate,\n        y      : 'godinu',\n        yy     : translator$2.translate\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n\nhooks.defineLocale('ss', {\n    months : \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split('_'),\n    monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n    weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),\n    weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n    weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY h:mm A',\n        LLLL : 'dddd, D MMMM YYYY h:mm A'\n    },\n    calendar : {\n        sameDay : '[Namuhla nga] LT',\n        nextDay : '[Kusasa nga] LT',\n        nextWeek : 'dddd [nga] LT',\n        lastDay : '[Itolo nga] LT',\n        lastWeek : 'dddd [leliphelile] [nga] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'nga %s',\n        past : 'wenteka nga %s',\n        s : 'emizuzwana lomcane',\n        m : 'umzuzu',\n        mm : '%d emizuzu',\n        h : 'lihora',\n        hh : '%d emahora',\n        d : 'lilanga',\n        dd : '%d emalanga',\n        M : 'inyanga',\n        MM : '%d tinyanga',\n        y : 'umnyaka',\n        yy : '%d iminyaka'\n    },\n    meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 11) {\n            return 'ekuseni';\n        } else if (hours < 15) {\n            return 'emini';\n        } else if (hours < 19) {\n            return 'entsambama';\n        } else {\n            return 'ebusuku';\n        }\n    },\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'ekuseni') {\n            return hour;\n        } else if (meridiem === 'emini') {\n            return hour >= 11 ? hour : hour + 12;\n        } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n            if (hour === 0) {\n                return 0;\n            }\n            return hour + 12;\n        }\n    },\n    ordinalParse: /\\d{1,2}/,\n    ordinal : '%d',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\nhooks.defineLocale('sv', {\n    months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),\n    monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n    weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n    weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n    weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'YYYY-MM-DD',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY [kl.] HH:mm',\n        LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',\n        lll : 'D MMM YYYY HH:mm',\n        llll : 'ddd D MMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Idag] LT',\n        nextDay: '[Imorgon] LT',\n        lastDay: '[Igår] LT',\n        nextWeek: '[På] dddd LT',\n        lastWeek: '[I] dddd[s] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'om %s',\n        past : 'för %s sedan',\n        s : 'några sekunder',\n        m : 'en minut',\n        mm : '%d minuter',\n        h : 'en timme',\n        hh : '%d timmar',\n        d : 'en dag',\n        dd : '%d dagar',\n        M : 'en månad',\n        MM : '%d månader',\n        y : 'ett år',\n        yy : '%d år'\n    },\n    ordinalParse: /\\d{1,2}(e|a)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'e' :\n            (b === 1) ? 'a' :\n            (b === 2) ? 'a' :\n            (b === 3) ? 'e' : 'e';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\nhooks.defineLocale('sw', {\n    months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),\n    monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n    weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),\n    weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n    weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[leo saa] LT',\n        nextDay : '[kesho saa] LT',\n        nextWeek : '[wiki ijayo] dddd [saat] LT',\n        lastDay : '[jana] LT',\n        lastWeek : '[wiki iliyopita] dddd [saat] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s baadaye',\n        past : 'tokea %s',\n        s : 'hivi punde',\n        m : 'dakika moja',\n        mm : 'dakika %d',\n        h : 'saa limoja',\n        hh : 'masaa %d',\n        d : 'siku moja',\n        dd : 'masiku %d',\n        M : 'mwezi mmoja',\n        MM : 'miezi %d',\n        y : 'mwaka mmoja',\n        yy : 'miaka %d'\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\nvar symbolMap$11 = {\n    '1': '௧',\n    '2': '௨',\n    '3': '௩',\n    '4': '௪',\n    '5': '௫',\n    '6': '௬',\n    '7': '௭',\n    '8': '௮',\n    '9': '௯',\n    '0': '௦'\n};\nvar numberMap$10 = {\n    '௧': '1',\n    '௨': '2',\n    '௩': '3',\n    '௪': '4',\n    '௫': '5',\n    '௬': '6',\n    '௭': '7',\n    '௮': '8',\n    '௯': '9',\n    '௦': '0'\n};\n\nhooks.defineLocale('ta', {\n    months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n    monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n    weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),\n    weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),\n    weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, HH:mm',\n        LLLL : 'dddd, D MMMM YYYY, HH:mm'\n    },\n    calendar : {\n        sameDay : '[இன்று] LT',\n        nextDay : '[நாளை] LT',\n        nextWeek : 'dddd, LT',\n        lastDay : '[நேற்று] LT',\n        lastWeek : '[கடந்த வாரம்] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s இல்',\n        past : '%s முன்',\n        s : 'ஒரு சில விநாடிகள்',\n        m : 'ஒரு நிமிடம்',\n        mm : '%d நிமிடங்கள்',\n        h : 'ஒரு மணி நேரம்',\n        hh : '%d மணி நேரம்',\n        d : 'ஒரு நாள்',\n        dd : '%d நாட்கள்',\n        M : 'ஒரு மாதம்',\n        MM : '%d மாதங்கள்',\n        y : 'ஒரு வருடம்',\n        yy : '%d ஆண்டுகள்'\n    },\n    ordinalParse: /\\d{1,2}வது/,\n    ordinal : function (number) {\n        return number + 'வது';\n    },\n    preparse: function (string) {\n        return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n            return numberMap$10[match];\n        });\n    },\n    postformat: function (string) {\n        return string.replace(/\\d/g, function (match) {\n            return symbolMap$11[match];\n        });\n    },\n    // refer http://ta.wikipedia.org/s/1er1\n    meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 2) {\n            return ' யாமம்';\n        } else if (hour < 6) {\n            return ' வைகறை';  // வைகறை\n        } else if (hour < 10) {\n            return ' காலை'; // காலை\n        } else if (hour < 14) {\n            return ' நண்பகல்'; // நண்பகல்\n        } else if (hour < 18) {\n            return ' எற்பாடு'; // எற்பாடு\n        } else if (hour < 22) {\n            return ' மாலை'; // மாலை\n        } else {\n            return ' யாமம்';\n        }\n    },\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'யாமம்') {\n            return hour < 2 ? hour : hour + 12;\n        } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n            return hour;\n        } else if (meridiem === 'நண்பகல்') {\n            return hour >= 10 ? hour : hour + 12;\n        } else {\n            return hour + 12;\n        }\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\nhooks.defineLocale('te', {\n    months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),\n    monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),\n    weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n    weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n    longDateFormat : {\n        LT : 'A h:mm',\n        LTS : 'A h:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY, A h:mm',\n        LLLL : 'dddd, D MMMM YYYY, A h:mm'\n    },\n    calendar : {\n        sameDay : '[నేడు] LT',\n        nextDay : '[రేపు] LT',\n        nextWeek : 'dddd, LT',\n        lastDay : '[నిన్న] LT',\n        lastWeek : '[గత] dddd, LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s లో',\n        past : '%s క్రితం',\n        s : 'కొన్ని క్షణాలు',\n        m : 'ఒక నిమిషం',\n        mm : '%d నిమిషాలు',\n        h : 'ఒక గంట',\n        hh : '%d గంటలు',\n        d : 'ఒక రోజు',\n        dd : '%d రోజులు',\n        M : 'ఒక నెల',\n        MM : '%d నెలలు',\n        y : 'ఒక సంవత్సరం',\n        yy : '%d సంవత్సరాలు'\n    },\n    ordinalParse : /\\d{1,2}వ/,\n    ordinal : '%dవ',\n    meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === 'రాత్రి') {\n            return hour < 4 ? hour : hour + 12;\n        } else if (meridiem === 'ఉదయం') {\n            return hour;\n        } else if (meridiem === 'మధ్యాహ్నం') {\n            return hour >= 10 ? hour : hour + 12;\n        } else if (meridiem === 'సాయంత్రం') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'రాత్రి';\n        } else if (hour < 10) {\n            return 'ఉదయం';\n        } else if (hour < 17) {\n            return 'మధ్యాహ్నం';\n        } else if (hour < 20) {\n            return 'సాయంత్రం';\n        } else {\n            return 'రాత్రి';\n        }\n    },\n    week : {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n\nhooks.defineLocale('tet', {\n    months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),\n    monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez'.split('_'),\n    weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu'.split('_'),\n    weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sext_Sab'.split('_'),\n    weekdaysMin : 'Do_Seg_Te_Ku_Ki_Sex_Sa'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Ohin iha] LT',\n        nextDay: '[Aban iha] LT',\n        nextWeek: 'dddd [iha] LT',\n        lastDay: '[Horiseik iha] LT',\n        lastWeek: 'dddd [semana kotuk] [iha] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'iha %s',\n        past : '%s liuba',\n        s : 'minutu balun',\n        m : 'minutu ida',\n        mm : 'minutus %d',\n        h : 'horas ida',\n        hh : 'horas %d',\n        d : 'loron ida',\n        dd : 'loron %d',\n        M : 'fulan ida',\n        MM : 'fulan %d',\n        y : 'tinan ida',\n        yy : 'tinan %d'\n    },\n    ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\nhooks.defineLocale('th', {\n    months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),\n    monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),\n    monthsParseExact: true,\n    weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n    weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n    weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'H:mm',\n        LTS : 'H:mm:ss',\n        L : 'YYYY/MM/DD',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY เวลา H:mm',\n        LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'\n    },\n    meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n    isPM: function (input) {\n        return input === 'หลังเที่ยง';\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 12) {\n            return 'ก่อนเที่ยง';\n        } else {\n            return 'หลังเที่ยง';\n        }\n    },\n    calendar : {\n        sameDay : '[วันนี้ เวลา] LT',\n        nextDay : '[พรุ่งนี้ เวลา] LT',\n        nextWeek : 'dddd[หน้า เวลา] LT',\n        lastDay : '[เมื่อวานนี้ เวลา] LT',\n        lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'อีก %s',\n        past : '%sที่แล้ว',\n        s : 'ไม่กี่วินาที',\n        m : '1 นาที',\n        mm : '%d นาที',\n        h : '1 ชั่วโมง',\n        hh : '%d ชั่วโมง',\n        d : '1 วัน',\n        dd : '%d วัน',\n        M : '1 เดือน',\n        MM : '%d เดือน',\n        y : '1 ปี',\n        yy : '%d ปี'\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\nhooks.defineLocale('tl-ph', {\n    months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n    monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n    weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n    weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n    weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'MM/D/YYYY',\n        LL : 'MMMM D, YYYY',\n        LLL : 'MMMM D, YYYY HH:mm',\n        LLLL : 'dddd, MMMM DD, YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: 'LT [ngayong araw]',\n        nextDay: '[Bukas ng] LT',\n        nextWeek: 'LT [sa susunod na] dddd',\n        lastDay: 'LT [kahapon]',\n        lastWeek: 'LT [noong nakaraang] dddd',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'sa loob ng %s',\n        past : '%s ang nakalipas',\n        s : 'ilang segundo',\n        m : 'isang minuto',\n        mm : '%d minuto',\n        h : 'isang oras',\n        hh : '%d oras',\n        d : 'isang araw',\n        dd : '%d araw',\n        M : 'isang buwan',\n        MM : '%d buwan',\n        y : 'isang taon',\n        yy : '%d taon'\n    },\n    ordinalParse: /\\d{1,2}/,\n    ordinal : function (number) {\n        return number;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\nvar numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\nfunction translateFuture(output) {\n    var time = output;\n    time = (output.indexOf('jaj') !== -1) ?\n    time.slice(0, -3) + 'leS' :\n    (output.indexOf('jar') !== -1) ?\n    time.slice(0, -3) + 'waQ' :\n    (output.indexOf('DIS') !== -1) ?\n    time.slice(0, -3) + 'nem' :\n    time + ' pIq';\n    return time;\n}\n\nfunction translatePast(output) {\n    var time = output;\n    time = (output.indexOf('jaj') !== -1) ?\n    time.slice(0, -3) + 'Hu’' :\n    (output.indexOf('jar') !== -1) ?\n    time.slice(0, -3) + 'wen' :\n    (output.indexOf('DIS') !== -1) ?\n    time.slice(0, -3) + 'ben' :\n    time + ' ret';\n    return time;\n}\n\nfunction translate$9(number, withoutSuffix, string, isFuture) {\n    var numberNoun = numberAsNoun(number);\n    switch (string) {\n        case 'mm':\n            return numberNoun + ' tup';\n        case 'hh':\n            return numberNoun + ' rep';\n        case 'dd':\n            return numberNoun + ' jaj';\n        case 'MM':\n            return numberNoun + ' jar';\n        case 'yy':\n            return numberNoun + ' DIS';\n    }\n}\n\nfunction numberAsNoun(number) {\n    var hundred = Math.floor((number % 1000) / 100),\n    ten = Math.floor((number % 100) / 10),\n    one = number % 10,\n    word = '';\n    if (hundred > 0) {\n        word += numbersNouns[hundred] + 'vatlh';\n    }\n    if (ten > 0) {\n        word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';\n    }\n    if (one > 0) {\n        word += ((word !== '') ? ' ' : '') + numbersNouns[one];\n    }\n    return (word === '') ? 'pagh' : word;\n}\n\nhooks.defineLocale('tlh', {\n    months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),\n    monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n    weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n    weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[DaHjaj] LT',\n        nextDay: '[wa’leS] LT',\n        nextWeek: 'LLL',\n        lastDay: '[wa’Hu’] LT',\n        lastWeek: 'LLL',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : translateFuture,\n        past : translatePast,\n        s : 'puS lup',\n        m : 'wa’ tup',\n        mm : translate$9,\n        h : 'wa’ rep',\n        hh : translate$9,\n        d : 'wa’ jaj',\n        dd : translate$9,\n        M : 'wa’ jar',\n        MM : translate$9,\n        y : 'wa’ DIS',\n        yy : translate$9\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//!           Burak Yiğit Kaya: https://github.com/BYK\n\nvar suffixes$3 = {\n    1: '\\'inci',\n    5: '\\'inci',\n    8: '\\'inci',\n    70: '\\'inci',\n    80: '\\'inci',\n    2: '\\'nci',\n    7: '\\'nci',\n    20: '\\'nci',\n    50: '\\'nci',\n    3: '\\'üncü',\n    4: '\\'üncü',\n    100: '\\'üncü',\n    6: '\\'ncı',\n    9: '\\'uncu',\n    10: '\\'uncu',\n    30: '\\'uncu',\n    60: '\\'ıncı',\n    90: '\\'ıncı'\n};\n\nhooks.defineLocale('tr', {\n    months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),\n    monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n    weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),\n    weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),\n    weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[bugün saat] LT',\n        nextDay : '[yarın saat] LT',\n        nextWeek : '[haftaya] dddd [saat] LT',\n        lastDay : '[dün] LT',\n        lastWeek : '[geçen hafta] dddd [saat] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : '%s sonra',\n        past : '%s önce',\n        s : 'birkaç saniye',\n        m : 'bir dakika',\n        mm : '%d dakika',\n        h : 'bir saat',\n        hh : '%d saat',\n        d : 'bir gün',\n        dd : '%d gün',\n        M : 'bir ay',\n        MM : '%d ay',\n        y : 'bir yıl',\n        yy : '%d yıl'\n    },\n    ordinalParse: /\\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,\n    ordinal : function (number) {\n        if (number === 0) {  // special case for zero\n            return number + '\\'ıncı';\n        }\n        var a = number % 10,\n            b = number % 100 - a,\n            c = number >= 100 ? 100 : null;\n        return number + (suffixes$3[a] || suffixes$3[b] || suffixes$3[c]);\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n// This is currently too difficult (maybe even impossible) to add.\nhooks.defineLocale('tzl', {\n    months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),\n    monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n    weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n    weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n    weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n    longDateFormat : {\n        LT : 'HH.mm',\n        LTS : 'HH.mm.ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D. MMMM [dallas] YYYY',\n        LLL : 'D. MMMM [dallas] YYYY HH.mm',\n        LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'\n    },\n    meridiemParse: /d\\'o|d\\'a/i,\n    isPM : function (input) {\n        return 'd\\'o' === input.toLowerCase();\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'd\\'o' : 'D\\'O';\n        } else {\n            return isLower ? 'd\\'a' : 'D\\'A';\n        }\n    },\n    calendar : {\n        sameDay : '[oxhi à] LT',\n        nextDay : '[demà à] LT',\n        nextWeek : 'dddd [à] LT',\n        lastDay : '[ieiri à] LT',\n        lastWeek : '[sür el] dddd [lasteu à] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'osprei %s',\n        past : 'ja%s',\n        s : processRelativeTime$5,\n        m : processRelativeTime$5,\n        mm : processRelativeTime$5,\n        h : processRelativeTime$5,\n        hh : processRelativeTime$5,\n        d : processRelativeTime$5,\n        dd : processRelativeTime$5,\n        M : processRelativeTime$5,\n        MM : processRelativeTime$5,\n        y : processRelativeTime$5,\n        yy : processRelativeTime$5\n    },\n    ordinalParse: /\\d{1,2}\\./,\n    ordinal : '%d.',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\nfunction processRelativeTime$5(number, withoutSuffix, key, isFuture) {\n    var format = {\n        's': ['viensas secunds', '\\'iensas secunds'],\n        'm': ['\\'n míut', '\\'iens míut'],\n        'mm': [number + ' míuts', '' + number + ' míuts'],\n        'h': ['\\'n þora', '\\'iensa þora'],\n        'hh': [number + ' þoras', '' + number + ' þoras'],\n        'd': ['\\'n ziua', '\\'iensa ziua'],\n        'dd': [number + ' ziuas', '' + number + ' ziuas'],\n        'M': ['\\'n mes', '\\'iens mes'],\n        'MM': [number + ' mesen', '' + number + ' mesen'],\n        'y': ['\\'n ar', '\\'iens ar'],\n        'yy': [number + ' ars', '' + number + ' ars']\n    };\n    return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);\n}\n\n//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\nhooks.defineLocale('tzm-latn', {\n    months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n    monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n    weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n    weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n    weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[asdkh g] LT',\n        nextDay: '[aska g] LT',\n        nextWeek: 'dddd [g] LT',\n        lastDay: '[assant g] LT',\n        lastWeek: 'dddd [g] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'dadkh s yan %s',\n        past : 'yan %s',\n        s : 'imik',\n        m : 'minuḍ',\n        mm : '%d minuḍ',\n        h : 'saɛa',\n        hh : '%d tassaɛin',\n        d : 'ass',\n        dd : '%d ossan',\n        M : 'ayowr',\n        MM : '%d iyyirn',\n        y : 'asgas',\n        yy : '%d isgasn'\n    },\n    week : {\n        dow : 6, // Saturday is the first day of the week.\n        doy : 12  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\nhooks.defineLocale('tzm', {\n    months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n    monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n    weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n    weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n    weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS: 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n        nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n        nextWeek: 'dddd [ⴴ] LT',\n        lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n        lastWeek: 'dddd [ⴴ] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n        past : 'ⵢⴰⵏ %s',\n        s : 'ⵉⵎⵉⴽ',\n        m : 'ⵎⵉⵏⵓⴺ',\n        mm : '%d ⵎⵉⵏⵓⴺ',\n        h : 'ⵙⴰⵄⴰ',\n        hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n        d : 'ⴰⵙⵙ',\n        dd : '%d oⵙⵙⴰⵏ',\n        M : 'ⴰⵢoⵓⵔ',\n        MM : '%d ⵉⵢⵢⵉⵔⵏ',\n        y : 'ⴰⵙⴳⴰⵙ',\n        yy : '%d ⵉⵙⴳⴰⵙⵏ'\n    },\n    week : {\n        dow : 6, // Saturday is the first day of the week.\n        doy : 12  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\nfunction plural$6(word, num) {\n    var forms = word.split('_');\n    return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n}\nfunction relativeTimeWithPlural$4(number, withoutSuffix, key) {\n    var format = {\n        'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n        'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n        'dd': 'день_дні_днів',\n        'MM': 'місяць_місяці_місяців',\n        'yy': 'рік_роки_років'\n    };\n    if (key === 'm') {\n        return withoutSuffix ? 'хвилина' : 'хвилину';\n    }\n    else if (key === 'h') {\n        return withoutSuffix ? 'година' : 'годину';\n    }\n    else {\n        return number + ' ' + plural$6(format[key], +number);\n    }\n}\nfunction weekdaysCaseReplace(m, format) {\n    var weekdays = {\n        'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),\n        'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),\n        'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')\n    },\n    nounCase = (/(\\[[ВвУу]\\]) ?dddd/).test(format) ?\n        'accusative' :\n        ((/\\[?(?:минулої|наступної)? ?\\] ?dddd/).test(format) ?\n            'genitive' :\n            'nominative');\n    return weekdays[nounCase][m.day()];\n}\nfunction processHoursFunction(str) {\n    return function () {\n        return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n    };\n}\n\nhooks.defineLocale('uk', {\n    months : {\n        'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),\n        'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')\n    },\n    monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),\n    weekdays : weekdaysCaseReplace,\n    weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n    weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD.MM.YYYY',\n        LL : 'D MMMM YYYY р.',\n        LLL : 'D MMMM YYYY р., HH:mm',\n        LLLL : 'dddd, D MMMM YYYY р., HH:mm'\n    },\n    calendar : {\n        sameDay: processHoursFunction('[Сьогодні '),\n        nextDay: processHoursFunction('[Завтра '),\n        lastDay: processHoursFunction('[Вчора '),\n        nextWeek: processHoursFunction('[У] dddd ['),\n        lastWeek: function () {\n            switch (this.day()) {\n                case 0:\n                case 3:\n                case 5:\n                case 6:\n                    return processHoursFunction('[Минулої] dddd [').call(this);\n                case 1:\n                case 2:\n                case 4:\n                    return processHoursFunction('[Минулого] dddd [').call(this);\n            }\n        },\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : 'за %s',\n        past : '%s тому',\n        s : 'декілька секунд',\n        m : relativeTimeWithPlural$4,\n        mm : relativeTimeWithPlural$4,\n        h : 'годину',\n        hh : relativeTimeWithPlural$4,\n        d : 'день',\n        dd : relativeTimeWithPlural$4,\n        M : 'місяць',\n        MM : relativeTimeWithPlural$4,\n        y : 'рік',\n        yy : relativeTimeWithPlural$4\n    },\n    // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n    meridiemParse: /ночі|ранку|дня|вечора/,\n    isPM: function (input) {\n        return /^(дня|вечора)$/.test(input);\n    },\n    meridiem : function (hour, minute, isLower) {\n        if (hour < 4) {\n            return 'ночі';\n        } else if (hour < 12) {\n            return 'ранку';\n        } else if (hour < 17) {\n            return 'дня';\n        } else {\n            return 'вечора';\n        }\n    },\n    ordinalParse: /\\d{1,2}-(й|го)/,\n    ordinal: function (number, period) {\n        switch (period) {\n            case 'M':\n            case 'd':\n            case 'DDD':\n            case 'w':\n            case 'W':\n                return number + '-й';\n            case 'D':\n                return number + '-го';\n            default:\n                return number;\n        }\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 1st is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\nhooks.defineLocale('uz', {\n    months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),\n    monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n    weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n    weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n    weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'D MMMM YYYY, dddd HH:mm'\n    },\n    calendar : {\n        sameDay : '[Бугун соат] LT [да]',\n        nextDay : '[Эртага] LT [да]',\n        nextWeek : 'dddd [куни соат] LT [да]',\n        lastDay : '[Кеча соат] LT [да]',\n        lastWeek : '[Утган] dddd [куни соат] LT [да]',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'Якин %s ичида',\n        past : 'Бир неча %s олдин',\n        s : 'фурсат',\n        m : 'бир дакика',\n        mm : '%d дакика',\n        h : 'бир соат',\n        hh : '%d соат',\n        d : 'бир кун',\n        dd : '%d кун',\n        M : 'бир ой',\n        MM : '%d ой',\n        y : 'бир йил',\n        yy : '%d йил'\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 7  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n\nhooks.defineLocale('vi', {\n    months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),\n    monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),\n    weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n    weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n    weekdaysParseExact : true,\n    meridiemParse: /sa|ch/i,\n    isPM : function (input) {\n        return /^ch$/i.test(input);\n    },\n    meridiem : function (hours, minutes, isLower) {\n        if (hours < 12) {\n            return isLower ? 'sa' : 'SA';\n        } else {\n            return isLower ? 'ch' : 'CH';\n        }\n    },\n    longDateFormat : {\n        LT : 'HH:mm',\n        LTS : 'HH:mm:ss',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM [năm] YYYY',\n        LLL : 'D MMMM [năm] YYYY HH:mm',\n        LLLL : 'dddd, D MMMM [năm] YYYY HH:mm',\n        l : 'DD/M/YYYY',\n        ll : 'D MMM YYYY',\n        lll : 'D MMM YYYY HH:mm',\n        llll : 'ddd, D MMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay: '[Hôm nay lúc] LT',\n        nextDay: '[Ngày mai lúc] LT',\n        nextWeek: 'dddd [tuần tới lúc] LT',\n        lastDay: '[Hôm qua lúc] LT',\n        lastWeek: 'dddd [tuần rồi lúc] LT',\n        sameElse: 'L'\n    },\n    relativeTime : {\n        future : '%s tới',\n        past : '%s trước',\n        s : 'vài giây',\n        m : 'một phút',\n        mm : '%d phút',\n        h : 'một giờ',\n        hh : '%d giờ',\n        d : 'một ngày',\n        dd : '%d ngày',\n        M : 'một tháng',\n        MM : '%d tháng',\n        y : 'một năm',\n        yy : '%d năm'\n    },\n    ordinalParse: /\\d{1,2}/,\n    ordinal : function (number) {\n        return number;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\nhooks.defineLocale('x-pseudo', {\n    months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),\n    monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),\n    monthsParseExact : true,\n    weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),\n    weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n    weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n    weekdaysParseExact : true,\n    longDateFormat : {\n        LT : 'HH:mm',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY HH:mm',\n        LLLL : 'dddd, D MMMM YYYY HH:mm'\n    },\n    calendar : {\n        sameDay : '[T~ódá~ý át] LT',\n        nextDay : '[T~ómó~rró~w át] LT',\n        nextWeek : 'dddd [át] LT',\n        lastDay : '[Ý~ést~érdá~ý át] LT',\n        lastWeek : '[L~ást] dddd [át] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'í~ñ %s',\n        past : '%s á~gó',\n        s : 'á ~féw ~sécó~ñds',\n        m : 'á ~míñ~úté',\n        mm : '%d m~íñú~tés',\n        h : 'á~ñ hó~úr',\n        hh : '%d h~óúrs',\n        d : 'á ~dáý',\n        dd : '%d d~áýs',\n        M : 'á ~móñ~th',\n        MM : '%d m~óñt~hs',\n        y : 'á ~ýéár',\n        yy : '%d ý~éárs'\n    },\n    ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n    ordinal : function (number) {\n        var b = number % 10,\n            output = (~~(number % 100 / 10) === 1) ? 'th' :\n            (b === 1) ? 'st' :\n            (b === 2) ? 'nd' :\n            (b === 3) ? 'rd' : 'th';\n        return number + output;\n    },\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Yoruba Nigeria (yo)\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\nhooks.defineLocale('yo', {\n    months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),\n    monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n    weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n    weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n    weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n    longDateFormat : {\n        LT : 'h:mm A',\n        LTS : 'h:mm:ss A',\n        L : 'DD/MM/YYYY',\n        LL : 'D MMMM YYYY',\n        LLL : 'D MMMM YYYY h:mm A',\n        LLLL : 'dddd, D MMMM YYYY h:mm A'\n    },\n    calendar : {\n        sameDay : '[Ònì ni] LT',\n        nextDay : '[Ọ̀la ni] LT',\n        nextWeek : 'dddd [Ọsẹ̀ tón\\'bọ] [ni] LT',\n        lastDay : '[Àna ni] LT',\n        lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n        sameElse : 'L'\n    },\n    relativeTime : {\n        future : 'ní %s',\n        past : '%s kọjá',\n        s : 'ìsẹjú aayá die',\n        m : 'ìsẹjú kan',\n        mm : 'ìsẹjú %d',\n        h : 'wákati kan',\n        hh : 'wákati %d',\n        d : 'ọjọ́ kan',\n        dd : 'ọjọ́ %d',\n        M : 'osù kan',\n        MM : 'osù %d',\n        y : 'ọdún kan',\n        yy : 'ọdún %d'\n    },\n    ordinalParse : /ọjọ́\\s\\d{1,2}/,\n    ordinal : 'ọjọ́ %d',\n    week : {\n        dow : 1, // Monday is the first day of the week.\n        doy : 4 // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n\nhooks.defineLocale('zh-cn', {\n    months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n    monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n    weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n    weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n    weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n    longDateFormat : {\n        LT : 'Ah点mm分',\n        LTS : 'Ah点m分s秒',\n        L : 'YYYY-MM-DD',\n        LL : 'YYYY年MMMD日',\n        LLL : 'YYYY年MMMD日Ah点mm分',\n        LLLL : 'YYYY年MMMD日ddddAh点mm分',\n        l : 'YYYY-MM-DD',\n        ll : 'YYYY年MMMD日',\n        lll : 'YYYY年MMMD日Ah点mm分',\n        llll : 'YYYY年MMMD日ddddAh点mm分'\n    },\n    meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n    meridiemHour: function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === '凌晨' || meridiem === '早上' ||\n                meridiem === '上午') {\n            return hour;\n        } else if (meridiem === '下午' || meridiem === '晚上') {\n            return hour + 12;\n        } else {\n            // '中午'\n            return hour >= 11 ? hour : hour + 12;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        var hm = hour * 100 + minute;\n        if (hm < 600) {\n            return '凌晨';\n        } else if (hm < 900) {\n            return '早上';\n        } else if (hm < 1130) {\n            return '上午';\n        } else if (hm < 1230) {\n            return '中午';\n        } else if (hm < 1800) {\n            return '下午';\n        } else {\n            return '晚上';\n        }\n    },\n    calendar : {\n        sameDay : function () {\n            return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT';\n        },\n        nextDay : function () {\n            return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT';\n        },\n        lastDay : function () {\n            return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT';\n        },\n        nextWeek : function () {\n            var startOfWeek, prefix;\n            startOfWeek = hooks().startOf('week');\n            prefix = this.diff(startOfWeek, 'days') >= 7 ? '[下]' : '[本]';\n            return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';\n        },\n        lastWeek : function () {\n            var startOfWeek, prefix;\n            startOfWeek = hooks().startOf('week');\n            prefix = this.unix() < startOfWeek.unix()  ? '[上]' : '[本]';\n            return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';\n        },\n        sameElse : 'LL'\n    },\n    ordinalParse: /\\d{1,2}(日|月|周)/,\n    ordinal : function (number, period) {\n        switch (period) {\n            case 'd':\n            case 'D':\n            case 'DDD':\n                return number + '日';\n            case 'M':\n                return number + '月';\n            case 'w':\n            case 'W':\n                return number + '周';\n            default:\n                return number;\n        }\n    },\n    relativeTime : {\n        future : '%s内',\n        past : '%s前',\n        s : '几秒',\n        m : '1 分钟',\n        mm : '%d 分钟',\n        h : '1 小时',\n        hh : '%d 小时',\n        d : '1 天',\n        dd : '%d 天',\n        M : '1 个月',\n        MM : '%d 个月',\n        y : '1 年',\n        yy : '%d 年'\n    },\n    week : {\n        // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n        dow : 1, // Monday is the first day of the week.\n        doy : 4  // The week that contains Jan 4th is the first week of the year.\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n\nhooks.defineLocale('zh-hk', {\n    months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n    monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n    weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n    weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n    weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n    longDateFormat : {\n        LT : 'Ah點mm分',\n        LTS : 'Ah點m分s秒',\n        L : 'YYYY年MMMD日',\n        LL : 'YYYY年MMMD日',\n        LLL : 'YYYY年MMMD日Ah點mm分',\n        LLLL : 'YYYY年MMMD日ddddAh點mm分',\n        l : 'YYYY年MMMD日',\n        ll : 'YYYY年MMMD日',\n        lll : 'YYYY年MMMD日Ah點mm分',\n        llll : 'YYYY年MMMD日ddddAh點mm分'\n    },\n    meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n            return hour;\n        } else if (meridiem === '中午') {\n            return hour >= 11 ? hour : hour + 12;\n        } else if (meridiem === '下午' || meridiem === '晚上') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        var hm = hour * 100 + minute;\n        if (hm < 600) {\n            return '凌晨';\n        } else if (hm < 900) {\n            return '早上';\n        } else if (hm < 1130) {\n            return '上午';\n        } else if (hm < 1230) {\n            return '中午';\n        } else if (hm < 1800) {\n            return '下午';\n        } else {\n            return '晚上';\n        }\n    },\n    calendar : {\n        sameDay : '[今天]LT',\n        nextDay : '[明天]LT',\n        nextWeek : '[下]ddddLT',\n        lastDay : '[昨天]LT',\n        lastWeek : '[上]ddddLT',\n        sameElse : 'L'\n    },\n    ordinalParse: /\\d{1,2}(日|月|週)/,\n    ordinal : function (number, period) {\n        switch (period) {\n            case 'd' :\n            case 'D' :\n            case 'DDD' :\n                return number + '日';\n            case 'M' :\n                return number + '月';\n            case 'w' :\n            case 'W' :\n                return number + '週';\n            default :\n                return number;\n        }\n    },\n    relativeTime : {\n        future : '%s內',\n        past : '%s前',\n        s : '幾秒',\n        m : '1 分鐘',\n        mm : '%d 分鐘',\n        h : '1 小時',\n        hh : '%d 小時',\n        d : '1 天',\n        dd : '%d 天',\n        M : '1 個月',\n        MM : '%d 個月',\n        y : '1 年',\n        yy : '%d 年'\n    }\n});\n\n//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\nhooks.defineLocale('zh-tw', {\n    months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n    monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n    weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n    weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n    weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n    longDateFormat : {\n        LT : 'Ah點mm分',\n        LTS : 'Ah點m分s秒',\n        L : 'YYYY年MMMD日',\n        LL : 'YYYY年MMMD日',\n        LLL : 'YYYY年MMMD日Ah點mm分',\n        LLLL : 'YYYY年MMMD日ddddAh點mm分',\n        l : 'YYYY年MMMD日',\n        ll : 'YYYY年MMMD日',\n        lll : 'YYYY年MMMD日Ah點mm分',\n        llll : 'YYYY年MMMD日ddddAh點mm分'\n    },\n    meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n    meridiemHour : function (hour, meridiem) {\n        if (hour === 12) {\n            hour = 0;\n        }\n        if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n            return hour;\n        } else if (meridiem === '中午') {\n            return hour >= 11 ? hour : hour + 12;\n        } else if (meridiem === '下午' || meridiem === '晚上') {\n            return hour + 12;\n        }\n    },\n    meridiem : function (hour, minute, isLower) {\n        var hm = hour * 100 + minute;\n        if (hm < 600) {\n            return '凌晨';\n        } else if (hm < 900) {\n            return '早上';\n        } else if (hm < 1130) {\n            return '上午';\n        } else if (hm < 1230) {\n            return '中午';\n        } else if (hm < 1800) {\n            return '下午';\n        } else {\n            return '晚上';\n        }\n    },\n    calendar : {\n        sameDay : '[今天]LT',\n        nextDay : '[明天]LT',\n        nextWeek : '[下]ddddLT',\n        lastDay : '[昨天]LT',\n        lastWeek : '[上]ddddLT',\n        sameElse : 'L'\n    },\n    ordinalParse: /\\d{1,2}(日|月|週)/,\n    ordinal : function (number, period) {\n        switch (period) {\n            case 'd' :\n            case 'D' :\n            case 'DDD' :\n                return number + '日';\n            case 'M' :\n                return number + '月';\n            case 'w' :\n            case 'W' :\n                return number + '週';\n            default :\n                return number;\n        }\n    },\n    relativeTime : {\n        future : '%s內',\n        past : '%s前',\n        s : '幾秒',\n        m : '1 分鐘',\n        mm : '%d 分鐘',\n        h : '1 小時',\n        hh : '%d 小時',\n        d : '1 天',\n        dd : '%d 天',\n        M : '1 個月',\n        MM : '%d 個月',\n        y : '1 年',\n        yy : '%d 年'\n    }\n});\n\nhooks.locale('en');\n\nreturn hooks;\n\n})));\n"

/***/ },

/***/ 758:
/***/ function(module, exports) {

module.exports = "/*! ========================================================================\r\n * Bootstrap Toggle: bootstrap-toggle.js v2.2.0\r\n * http://www.bootstraptoggle.com\r\n * ========================================================================\r\n * Copyright 2014 Min Hur, The New York Times Company\r\n * Licensed under MIT\r\n * ======================================================================== */\r\n\r\n\r\n +function ($) {\r\n \t'use strict';\r\n\r\n\t// TOGGLE PUBLIC CLASS DEFINITION\r\n\t// ==============================\r\n\r\n\tvar Toggle = function (element, options) {\r\n\t\tthis.$element  = $(element)\r\n\t\tthis.options   = $.extend({}, this.defaults(), options)\r\n\t\tthis.render()\r\n\t}\r\n\r\n\tToggle.VERSION  = '2.2.0'\r\n\r\n\tToggle.DEFAULTS = {\r\n\t\ton: 'On',\r\n\t\toff: 'Off',\r\n\t\tonstyle: 'primary',\r\n\t\toffstyle: 'default',\r\n\t\tsize: 'normal',\r\n\t\tstyle: '',\r\n\t\twidth: null,\r\n\t\theight: null\r\n\t}\r\n\r\n\tToggle.prototype.defaults = function() {\r\n\t\treturn {\r\n\t\t\ton: this.$element.attr('data-on') || Toggle.DEFAULTS.on,\r\n\t\t\toff: this.$element.attr('data-off') || Toggle.DEFAULTS.off,\r\n\t\t\tonstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle,\r\n\t\t\toffstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle,\r\n\t\t\tsize: this.$element.attr('data-size') || Toggle.DEFAULTS.size,\r\n\t\t\tstyle: this.$element.attr('data-style') || Toggle.DEFAULTS.style,\r\n\t\t\twidth: this.$element.attr('data-width') || Toggle.DEFAULTS.width,\r\n\t\t\theight: this.$element.attr('data-height') || Toggle.DEFAULTS.height\r\n\t\t}\r\n\t}\r\n\r\n\tToggle.prototype.render = function () {\r\n\t\tthis._onstyle = 'btn-' + this.options.onstyle\r\n\t\tthis._offstyle = 'btn-' + this.options.offstyle\r\n\t\tvar size = this.options.size === 'large' ? 'btn-lg'\r\n\t\t\t: this.options.size === 'small' ? 'btn-sm'\r\n\t\t\t: this.options.size === 'mini' ? 'btn-xs'\r\n\t\t\t: ''\r\n\t\tvar $toggleOn = $('<label class=\"btn\">').html(this.options.on)\r\n\t\t\t.addClass(this._onstyle + ' ' + size)\r\n\t\tvar $toggleOff = $('<label class=\"btn\">').html(this.options.off)\r\n\t\t\t.addClass(this._offstyle + ' ' + size + ' active')\r\n\t\tvar $toggleHandle = $('<span class=\"toggle-handle btn btn-default\">')\r\n\t\t\t.addClass(size)\r\n\t\tvar $toggleGroup = $('<div class=\"toggle-group\">')\r\n\t\t\t.append($toggleOn, $toggleOff, $toggleHandle)\r\n\t\tvar $toggle = $('<div class=\"toggle btn\" data-toggle=\"toggle\">')\r\n\t\t\t.addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' )\r\n\t\t\t.addClass(size).addClass(this.options.style)\r\n\r\n\t\tthis.$element.wrap($toggle)\r\n\t\t$.extend(this, {\r\n\t\t\t$toggle: this.$element.parent(),\r\n\t\t\t$toggleOn: $toggleOn,\r\n\t\t\t$toggleOff: $toggleOff,\r\n\t\t\t$toggleGroup: $toggleGroup\r\n\t\t})\r\n\t\tthis.$toggle.append($toggleGroup)\r\n\r\n\t\tvar width = this.options.width || Math.max($toggleOn.outerWidth(), $toggleOff.outerWidth())+($toggleHandle.outerWidth()/2)\r\n\t\tvar height = this.options.height || Math.max($toggleOn.outerHeight(), $toggleOff.outerHeight())\r\n\t\t$toggleOn.addClass('toggle-on')\r\n\t\t$toggleOff.addClass('toggle-off')\r\n\t\tthis.$toggle.css({ width: width, height: height })\r\n\t\tif (this.options.height) {\r\n\t\t\t$toggleOn.css('line-height', $toggleOn.height() + 'px')\r\n\t\t\t$toggleOff.css('line-height', $toggleOff.height() + 'px')\r\n\t\t}\r\n\t\tthis.update(true)\r\n\t\tthis.trigger(true)\r\n\t}\r\n\r\n\tToggle.prototype.toggle = function () {\r\n\t\tif (this.$element.prop('checked')) this.off()\r\n\t\telse this.on()\r\n\t}\r\n\r\n\tToggle.prototype.on = function (silent) {\r\n\t\tif (this.$element.prop('disabled')) return false\r\n\t\tthis.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle)\r\n\t\tthis.$element.prop('checked', true)\r\n\t\tif (!silent) this.trigger()\r\n\t}\r\n\r\n\tToggle.prototype.off = function (silent) {\r\n\t\tif (this.$element.prop('disabled')) return false\r\n\t\tthis.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off')\r\n\t\tthis.$element.prop('checked', false)\r\n\t\tif (!silent) this.trigger();\r\n\t}\r\n\r\n\tToggle.prototype.enable = function () {\r\n\t\tthis.$toggle.removeAttr('disabled')\r\n\t\tthis.$element.prop('disabled', false)\r\n\t}\r\n\r\n\tToggle.prototype.disable = function () {\r\n\t\tthis.$toggle.attr('disabled', 'disabled')\r\n\t\tthis.$element.prop('disabled', true)\r\n\t}\r\n\r\n\tToggle.prototype.update = function (silent) {\r\n\t\tif (this.$element.prop('disabled')) this.disable()\r\n\t\telse this.enable()\r\n\t\tif (this.$element.prop('checked')) this.on(silent)\r\n\t\telse this.off(silent)\r\n\t}\r\n\r\n\tToggle.prototype.trigger = function (silent) {\r\n\t\tthis.$element.off('change.bs.toggle')\r\n\t\tif (!silent) this.$element.change()\r\n\t\tthis.$element.on('change.bs.toggle', $.proxy(function() {\r\n\t\t\tthis.update()\r\n\t\t}, this))\r\n\t}\r\n\r\n\tToggle.prototype.destroy = function() {\r\n\t\tthis.$element.off('change.bs.toggle')\r\n\t\tthis.$toggleGroup.remove()\r\n\t\tthis.$element.removeData('bs.toggle')\r\n\t\tthis.$element.unwrap()\r\n\t}\r\n\r\n\t// TOGGLE PLUGIN DEFINITION\r\n\t// ========================\r\n\r\n\tfunction Plugin(option) {\r\n\t\treturn this.each(function () {\r\n\t\t\tvar $this   = $(this)\r\n\t\t\tvar data    = $this.data('bs.toggle')\r\n\t\t\tvar options = typeof option == 'object' && option\r\n\r\n\t\t\tif (!data) $this.data('bs.toggle', (data = new Toggle(this, options)))\r\n\t\t\tif (typeof option == 'string' && data[option]) data[option]()\r\n\t\t})\r\n\t}\r\n\r\n\tvar old = $.fn.bootstrapToggle\r\n\r\n\t$.fn.bootstrapToggle             = Plugin\r\n\t$.fn.bootstrapToggle.Constructor = Toggle\r\n\r\n\t// TOGGLE NO CONFLICT\r\n\t// ==================\r\n\r\n\t$.fn.toggle.noConflict = function () {\r\n\t\t$.fn.bootstrapToggle = old\r\n\t\treturn this\r\n\t}\r\n\r\n\t// TOGGLE DATA-API\r\n\t// ===============\r\n\r\n\t$(function() {\r\n\t\t$('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle()\r\n\t})\r\n\r\n\t$(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) {\r\n\t\tvar $checkbox = $(this).find('input[type=checkbox]')\r\n\t\t$checkbox.bootstrapToggle('toggle')\r\n\t\te.preventDefault()\r\n\t})\r\n\r\n}(jQuery);\r\n"

/***/ },

/***/ 759:
/***/ function(module, exports) {

module.exports = "/*!\r\n * Chart.js\r\n * http://chartjs.org/\r\n * Version: 2.2.2\r\n *\r\n * Copyright 2016 Nick Downie\r\n * Released under the MIT license\r\n * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md\r\n */\r\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\r\n/* MIT license */\r\nvar colorNames = require(5);\r\n\r\nmodule.exports = {\r\n   getRgba: getRgba,\r\n   getHsla: getHsla,\r\n   getRgb: getRgb,\r\n   getHsl: getHsl,\r\n   getHwb: getHwb,\r\n   getAlpha: getAlpha,\r\n\r\n   hexString: hexString,\r\n   rgbString: rgbString,\r\n   rgbaString: rgbaString,\r\n   percentString: percentString,\r\n   percentaString: percentaString,\r\n   hslString: hslString,\r\n   hslaString: hslaString,\r\n   hwbString: hwbString,\r\n   keyword: keyword\r\n}\r\n\r\nfunction getRgba(string) {\r\n   if (!string) {\r\n      return;\r\n   }\r\n   var abbr =  /^#([a-fA-F0-9]{3})$/,\r\n       hex =  /^#([a-fA-F0-9]{6})$/,\r\n       rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/,\r\n       per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/,\r\n       keyword = /(\\w+)/;\r\n\r\n   var rgb = [0, 0, 0],\r\n       a = 1,\r\n       match = string.match(abbr);\r\n   if (match) {\r\n      match = match[1];\r\n      for (var i = 0; i < rgb.length; i++) {\r\n         rgb[i] = parseInt(match[i] + match[i], 16);\r\n      }\r\n   }\r\n   else if (match = string.match(hex)) {\r\n      match = match[1];\r\n      for (var i = 0; i < rgb.length; i++) {\r\n         rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\r\n      }\r\n   }\r\n   else if (match = string.match(rgba)) {\r\n      for (var i = 0; i < rgb.length; i++) {\r\n         rgb[i] = parseInt(match[i + 1]);\r\n      }\r\n      a = parseFloat(match[4]);\r\n   }\r\n   else if (match = string.match(per)) {\r\n      for (var i = 0; i < rgb.length; i++) {\r\n         rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\r\n      }\r\n      a = parseFloat(match[4]);\r\n   }\r\n   else if (match = string.match(keyword)) {\r\n      if (match[1] == \"transparent\") {\r\n         return [0, 0, 0, 0];\r\n      }\r\n      rgb = colorNames[match[1]];\r\n      if (!rgb) {\r\n         return;\r\n      }\r\n   }\r\n\r\n   for (var i = 0; i < rgb.length; i++) {\r\n      rgb[i] = scale(rgb[i], 0, 255);\r\n   }\r\n   if (!a && a != 0) {\r\n      a = 1;\r\n   }\r\n   else {\r\n      a = scale(a, 0, 1);\r\n   }\r\n   rgb[3] = a;\r\n   return rgb;\r\n}\r\n\r\nfunction getHsla(string) {\r\n   if (!string) {\r\n      return;\r\n   }\r\n   var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\r\n   var match = string.match(hsl);\r\n   if (match) {\r\n      var alpha = parseFloat(match[4]);\r\n      var h = scale(parseInt(match[1]), 0, 360),\r\n          s = scale(parseFloat(match[2]), 0, 100),\r\n          l = scale(parseFloat(match[3]), 0, 100),\r\n          a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\r\n      return [h, s, l, a];\r\n   }\r\n}\r\n\r\nfunction getHwb(string) {\r\n   if (!string) {\r\n      return;\r\n   }\r\n   var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\r\n   var match = string.match(hwb);\r\n   if (match) {\r\n    var alpha = parseFloat(match[4]);\r\n      var h = scale(parseInt(match[1]), 0, 360),\r\n          w = scale(parseFloat(match[2]), 0, 100),\r\n          b = scale(parseFloat(match[3]), 0, 100),\r\n          a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\r\n      return [h, w, b, a];\r\n   }\r\n}\r\n\r\nfunction getRgb(string) {\r\n   var rgba = getRgba(string);\r\n   return rgba && rgba.slice(0, 3);\r\n}\r\n\r\nfunction getHsl(string) {\r\n  var hsla = getHsla(string);\r\n  return hsla && hsla.slice(0, 3);\r\n}\r\n\r\nfunction getAlpha(string) {\r\n   var vals = getRgba(string);\r\n   if (vals) {\r\n      return vals[3];\r\n   }\r\n   else if (vals = getHsla(string)) {\r\n      return vals[3];\r\n   }\r\n   else if (vals = getHwb(string)) {\r\n      return vals[3];\r\n   }\r\n}\r\n\r\n// generators\r\nfunction hexString(rgb) {\r\n   return \"#\" + hexDouble(rgb[0]) + hexDouble(rgb[1])\r\n              + hexDouble(rgb[2]);\r\n}\r\n\r\nfunction rgbString(rgba, alpha) {\r\n   if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\r\n      return rgbaString(rgba, alpha);\r\n   }\r\n   return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\r\n}\r\n\r\nfunction rgbaString(rgba, alpha) {\r\n   if (alpha === undefined) {\r\n      alpha = (rgba[3] !== undefined ? rgba[3] : 1);\r\n   }\r\n   return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2]\r\n           + \", \" + alpha + \")\";\r\n}\r\n\r\nfunction percentString(rgba, alpha) {\r\n   if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\r\n      return percentaString(rgba, alpha);\r\n   }\r\n   var r = Math.round(rgba[0]/255 * 100),\r\n       g = Math.round(rgba[1]/255 * 100),\r\n       b = Math.round(rgba[2]/255 * 100);\r\n\r\n   return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\r\n}\r\n\r\nfunction percentaString(rgba, alpha) {\r\n   var r = Math.round(rgba[0]/255 * 100),\r\n       g = Math.round(rgba[1]/255 * 100),\r\n       b = Math.round(rgba[2]/255 * 100);\r\n   return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\r\n}\r\n\r\nfunction hslString(hsla, alpha) {\r\n   if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {\r\n      return hslaString(hsla, alpha);\r\n   }\r\n   return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\r\n}\r\n\r\nfunction hslaString(hsla, alpha) {\r\n   if (alpha === undefined) {\r\n      alpha = (hsla[3] !== undefined ? hsla[3] : 1);\r\n   }\r\n   return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \"\r\n           + alpha + \")\";\r\n}\r\n\r\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\r\n// (hwb have alpha optional & 1 is default value)\r\nfunction hwbString(hwb, alpha) {\r\n   if (alpha === undefined) {\r\n      alpha = (hwb[3] !== undefined ? hwb[3] : 1);\r\n   }\r\n   return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\"\r\n           + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\r\n}\r\n\r\nfunction keyword(rgb) {\r\n  return reverseNames[rgb.slice(0, 3)];\r\n}\r\n\r\n// helpers\r\nfunction scale(num, min, max) {\r\n   return Math.min(Math.max(min, num), max);\r\n}\r\n\r\nfunction hexDouble(num) {\r\n  var str = num.toString(16).toUpperCase();\r\n  return (str.length < 2) ? \"0\" + str : str;\r\n}\r\n\r\n\r\n//create a list of reverse color names\r\nvar reverseNames = {};\r\nfor (var name in colorNames) {\r\n   reverseNames[colorNames[name]] = name;\r\n}\r\n\r\n},{\"5\":5}],2:[function(require,module,exports){\r\n/* MIT license */\r\nvar convert = require(4);\r\nvar string = require(1);\r\n\r\nvar Color = function (obj) {\r\n\tif (obj instanceof Color) {\r\n\t\treturn obj;\r\n\t}\r\n\tif (!(this instanceof Color)) {\r\n\t\treturn new Color(obj);\r\n\t}\r\n\r\n\tthis.values = {\r\n\t\trgb: [0, 0, 0],\r\n\t\thsl: [0, 0, 0],\r\n\t\thsv: [0, 0, 0],\r\n\t\thwb: [0, 0, 0],\r\n\t\tcmyk: [0, 0, 0, 0],\r\n\t\talpha: 1\r\n\t};\r\n\r\n\t// parse Color() argument\r\n\tvar vals;\r\n\tif (typeof obj === 'string') {\r\n\t\tvals = string.getRgba(obj);\r\n\t\tif (vals) {\r\n\t\t\tthis.setValues('rgb', vals);\r\n\t\t} else if (vals = string.getHsla(obj)) {\r\n\t\t\tthis.setValues('hsl', vals);\r\n\t\t} else if (vals = string.getHwb(obj)) {\r\n\t\t\tthis.setValues('hwb', vals);\r\n\t\t} else {\r\n\t\t\tthrow new Error('Unable to parse color from string \"' + obj + '\"');\r\n\t\t}\r\n\t} else if (typeof obj === 'object') {\r\n\t\tvals = obj;\r\n\t\tif (vals.r !== undefined || vals.red !== undefined) {\r\n\t\t\tthis.setValues('rgb', vals);\r\n\t\t} else if (vals.l !== undefined || vals.lightness !== undefined) {\r\n\t\t\tthis.setValues('hsl', vals);\r\n\t\t} else if (vals.v !== undefined || vals.value !== undefined) {\r\n\t\t\tthis.setValues('hsv', vals);\r\n\t\t} else if (vals.w !== undefined || vals.whiteness !== undefined) {\r\n\t\t\tthis.setValues('hwb', vals);\r\n\t\t} else if (vals.c !== undefined || vals.cyan !== undefined) {\r\n\t\t\tthis.setValues('cmyk', vals);\r\n\t\t} else {\r\n\t\t\tthrow new Error('Unable to parse color from object ' + JSON.stringify(obj));\r\n\t\t}\r\n\t}\r\n};\r\n\r\nColor.prototype = {\r\n\trgb: function () {\r\n\t\treturn this.setSpace('rgb', arguments);\r\n\t},\r\n\thsl: function () {\r\n\t\treturn this.setSpace('hsl', arguments);\r\n\t},\r\n\thsv: function () {\r\n\t\treturn this.setSpace('hsv', arguments);\r\n\t},\r\n\thwb: function () {\r\n\t\treturn this.setSpace('hwb', arguments);\r\n\t},\r\n\tcmyk: function () {\r\n\t\treturn this.setSpace('cmyk', arguments);\r\n\t},\r\n\r\n\trgbArray: function () {\r\n\t\treturn this.values.rgb;\r\n\t},\r\n\thslArray: function () {\r\n\t\treturn this.values.hsl;\r\n\t},\r\n\thsvArray: function () {\r\n\t\treturn this.values.hsv;\r\n\t},\r\n\thwbArray: function () {\r\n\t\tvar values = this.values;\r\n\t\tif (values.alpha !== 1) {\r\n\t\t\treturn values.hwb.concat([values.alpha]);\r\n\t\t}\r\n\t\treturn values.hwb;\r\n\t},\r\n\tcmykArray: function () {\r\n\t\treturn this.values.cmyk;\r\n\t},\r\n\trgbaArray: function () {\r\n\t\tvar values = this.values;\r\n\t\treturn values.rgb.concat([values.alpha]);\r\n\t},\r\n\thslaArray: function () {\r\n\t\tvar values = this.values;\r\n\t\treturn values.hsl.concat([values.alpha]);\r\n\t},\r\n\talpha: function (val) {\r\n\t\tif (val === undefined) {\r\n\t\t\treturn this.values.alpha;\r\n\t\t}\r\n\t\tthis.setValues('alpha', val);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tred: function (val) {\r\n\t\treturn this.setChannel('rgb', 0, val);\r\n\t},\r\n\tgreen: function (val) {\r\n\t\treturn this.setChannel('rgb', 1, val);\r\n\t},\r\n\tblue: function (val) {\r\n\t\treturn this.setChannel('rgb', 2, val);\r\n\t},\r\n\thue: function (val) {\r\n\t\tif (val) {\r\n\t\t\tval %= 360;\r\n\t\t\tval = val < 0 ? 360 + val : val;\r\n\t\t}\r\n\t\treturn this.setChannel('hsl', 0, val);\r\n\t},\r\n\tsaturation: function (val) {\r\n\t\treturn this.setChannel('hsl', 1, val);\r\n\t},\r\n\tlightness: function (val) {\r\n\t\treturn this.setChannel('hsl', 2, val);\r\n\t},\r\n\tsaturationv: function (val) {\r\n\t\treturn this.setChannel('hsv', 1, val);\r\n\t},\r\n\twhiteness: function (val) {\r\n\t\treturn this.setChannel('hwb', 1, val);\r\n\t},\r\n\tblackness: function (val) {\r\n\t\treturn this.setChannel('hwb', 2, val);\r\n\t},\r\n\tvalue: function (val) {\r\n\t\treturn this.setChannel('hsv', 2, val);\r\n\t},\r\n\tcyan: function (val) {\r\n\t\treturn this.setChannel('cmyk', 0, val);\r\n\t},\r\n\tmagenta: function (val) {\r\n\t\treturn this.setChannel('cmyk', 1, val);\r\n\t},\r\n\tyellow: function (val) {\r\n\t\treturn this.setChannel('cmyk', 2, val);\r\n\t},\r\n\tblack: function (val) {\r\n\t\treturn this.setChannel('cmyk', 3, val);\r\n\t},\r\n\r\n\thexString: function () {\r\n\t\treturn string.hexString(this.values.rgb);\r\n\t},\r\n\trgbString: function () {\r\n\t\treturn string.rgbString(this.values.rgb, this.values.alpha);\r\n\t},\r\n\trgbaString: function () {\r\n\t\treturn string.rgbaString(this.values.rgb, this.values.alpha);\r\n\t},\r\n\tpercentString: function () {\r\n\t\treturn string.percentString(this.values.rgb, this.values.alpha);\r\n\t},\r\n\thslString: function () {\r\n\t\treturn string.hslString(this.values.hsl, this.values.alpha);\r\n\t},\r\n\thslaString: function () {\r\n\t\treturn string.hslaString(this.values.hsl, this.values.alpha);\r\n\t},\r\n\thwbString: function () {\r\n\t\treturn string.hwbString(this.values.hwb, this.values.alpha);\r\n\t},\r\n\tkeyword: function () {\r\n\t\treturn string.keyword(this.values.rgb, this.values.alpha);\r\n\t},\r\n\r\n\trgbNumber: function () {\r\n\t\tvar rgb = this.values.rgb;\r\n\t\treturn (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];\r\n\t},\r\n\r\n\tluminosity: function () {\r\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\r\n\t\tvar rgb = this.values.rgb;\r\n\t\tvar lum = [];\r\n\t\tfor (var i = 0; i < rgb.length; i++) {\r\n\t\t\tvar chan = rgb[i] / 255;\r\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\r\n\t\t}\r\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\r\n\t},\r\n\r\n\tcontrast: function (color2) {\r\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\r\n\t\tvar lum1 = this.luminosity();\r\n\t\tvar lum2 = color2.luminosity();\r\n\t\tif (lum1 > lum2) {\r\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\r\n\t\t}\r\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\r\n\t},\r\n\r\n\tlevel: function (color2) {\r\n\t\tvar contrastRatio = this.contrast(color2);\r\n\t\tif (contrastRatio >= 7.1) {\r\n\t\t\treturn 'AAA';\r\n\t\t}\r\n\r\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\r\n\t},\r\n\r\n\tdark: function () {\r\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\r\n\t\tvar rgb = this.values.rgb;\r\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\r\n\t\treturn yiq < 128;\r\n\t},\r\n\r\n\tlight: function () {\r\n\t\treturn !this.dark();\r\n\t},\r\n\r\n\tnegate: function () {\r\n\t\tvar rgb = [];\r\n\t\tfor (var i = 0; i < 3; i++) {\r\n\t\t\trgb[i] = 255 - this.values.rgb[i];\r\n\t\t}\r\n\t\tthis.setValues('rgb', rgb);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tlighten: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[2] += hsl[2] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tdarken: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[2] -= hsl[2] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsaturate: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[1] += hsl[1] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tdesaturate: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[1] -= hsl[1] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\twhiten: function (ratio) {\r\n\t\tvar hwb = this.values.hwb;\r\n\t\thwb[1] += hwb[1] * ratio;\r\n\t\tthis.setValues('hwb', hwb);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tblacken: function (ratio) {\r\n\t\tvar hwb = this.values.hwb;\r\n\t\thwb[2] += hwb[2] * ratio;\r\n\t\tthis.setValues('hwb', hwb);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgreyscale: function () {\r\n\t\tvar rgb = this.values.rgb;\r\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\r\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\r\n\t\tthis.setValues('rgb', [val, val, val]);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclearer: function (ratio) {\r\n\t\tvar alpha = this.values.alpha;\r\n\t\tthis.setValues('alpha', alpha - (alpha * ratio));\r\n\t\treturn this;\r\n\t},\r\n\r\n\topaquer: function (ratio) {\r\n\t\tvar alpha = this.values.alpha;\r\n\t\tthis.setValues('alpha', alpha + (alpha * ratio));\r\n\t\treturn this;\r\n\t},\r\n\r\n\trotate: function (degrees) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\tvar hue = (hsl[0] + degrees) % 360;\r\n\t\thsl[0] = hue < 0 ? 360 + hue : hue;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t/**\r\n\t * Ported from sass implementation in C\r\n\t * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\r\n\t */\r\n\tmix: function (mixinColor, weight) {\r\n\t\tvar color1 = this;\r\n\t\tvar color2 = mixinColor;\r\n\t\tvar p = weight === undefined ? 0.5 : weight;\r\n\r\n\t\tvar w = 2 * p - 1;\r\n\t\tvar a = color1.alpha() - color2.alpha();\r\n\r\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\r\n\t\tvar w2 = 1 - w1;\r\n\r\n\t\treturn this\r\n\t\t\t.rgb(\r\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\r\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\r\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue()\r\n\t\t\t)\r\n\t\t\t.alpha(color1.alpha() * p + color2.alpha() * (1 - p));\r\n\t},\r\n\r\n\ttoJSON: function () {\r\n\t\treturn this.rgb();\r\n\t},\r\n\r\n\tclone: function () {\r\n\t\t// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\r\n\t\t// making the final build way to big to embed in Chart.js. So let's do it manually,\r\n\t\t// assuming that values to clone are 1 dimension arrays containing only numbers,\r\n\t\t// except 'alpha' which is a number.\r\n\t\tvar result = new Color();\r\n\t\tvar source = this.values;\r\n\t\tvar target = result.values;\r\n\t\tvar value, type;\r\n\r\n\t\tfor (var prop in source) {\r\n\t\t\tif (source.hasOwnProperty(prop)) {\r\n\t\t\t\tvalue = source[prop];\r\n\t\t\t\ttype = ({}).toString.call(value);\r\n\t\t\t\tif (type === '[object Array]') {\r\n\t\t\t\t\ttarget[prop] = value.slice(0);\r\n\t\t\t\t} else if (type === '[object Number]') {\r\n\t\t\t\t\ttarget[prop] = value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.error('unexpected color value:', value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n};\r\n\r\nColor.prototype.spaces = {\r\n\trgb: ['red', 'green', 'blue'],\r\n\thsl: ['hue', 'saturation', 'lightness'],\r\n\thsv: ['hue', 'saturation', 'value'],\r\n\thwb: ['hue', 'whiteness', 'blackness'],\r\n\tcmyk: ['cyan', 'magenta', 'yellow', 'black']\r\n};\r\n\r\nColor.prototype.maxes = {\r\n\trgb: [255, 255, 255],\r\n\thsl: [360, 100, 100],\r\n\thsv: [360, 100, 100],\r\n\thwb: [360, 100, 100],\r\n\tcmyk: [100, 100, 100, 100]\r\n};\r\n\r\nColor.prototype.getValues = function (space) {\r\n\tvar values = this.values;\r\n\tvar vals = {};\r\n\r\n\tfor (var i = 0; i < space.length; i++) {\r\n\t\tvals[space.charAt(i)] = values[space][i];\r\n\t}\r\n\r\n\tif (values.alpha !== 1) {\r\n\t\tvals.a = values.alpha;\r\n\t}\r\n\r\n\t// {r: 255, g: 255, b: 255, a: 0.4}\r\n\treturn vals;\r\n};\r\n\r\nColor.prototype.setValues = function (space, vals) {\r\n\tvar values = this.values;\r\n\tvar spaces = this.spaces;\r\n\tvar maxes = this.maxes;\r\n\tvar alpha = 1;\r\n\tvar i;\r\n\r\n\tif (space === 'alpha') {\r\n\t\talpha = vals;\r\n\t} else if (vals.length) {\r\n\t\t// [10, 10, 10]\r\n\t\tvalues[space] = vals.slice(0, space.length);\r\n\t\talpha = vals[space.length];\r\n\t} else if (vals[space.charAt(0)] !== undefined) {\r\n\t\t// {r: 10, g: 10, b: 10}\r\n\t\tfor (i = 0; i < space.length; i++) {\r\n\t\t\tvalues[space][i] = vals[space.charAt(i)];\r\n\t\t}\r\n\r\n\t\talpha = vals.a;\r\n\t} else if (vals[spaces[space][0]] !== undefined) {\r\n\t\t// {red: 10, green: 10, blue: 10}\r\n\t\tvar chans = spaces[space];\r\n\r\n\t\tfor (i = 0; i < space.length; i++) {\r\n\t\t\tvalues[space][i] = vals[chans[i]];\r\n\t\t}\r\n\r\n\t\talpha = vals.alpha;\r\n\t}\r\n\r\n\tvalues.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));\r\n\r\n\tif (space === 'alpha') {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar capped;\r\n\r\n\t// cap values of the space prior converting all values\r\n\tfor (i = 0; i < space.length; i++) {\r\n\t\tcapped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\r\n\t\tvalues[space][i] = Math.round(capped);\r\n\t}\r\n\r\n\t// convert to all the other color spaces\r\n\tfor (var sname in spaces) {\r\n\t\tif (sname !== space) {\r\n\t\t\tvalues[sname] = convert[space][sname](values[space]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n};\r\n\r\nColor.prototype.setSpace = function (space, args) {\r\n\tvar vals = args[0];\r\n\r\n\tif (vals === undefined) {\r\n\t\t// color.rgb()\r\n\t\treturn this.getValues(space);\r\n\t}\r\n\r\n\t// color.rgb(10, 10, 10)\r\n\tif (typeof vals === 'number') {\r\n\t\tvals = Array.prototype.slice.call(args);\r\n\t}\r\n\r\n\tthis.setValues(space, vals);\r\n\treturn this;\r\n};\r\n\r\nColor.prototype.setChannel = function (space, index, val) {\r\n\tvar svalues = this.values[space];\r\n\tif (val === undefined) {\r\n\t\t// color.red()\r\n\t\treturn svalues[index];\r\n\t} else if (val === svalues[index]) {\r\n\t\t// color.red(color.red())\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// color.red(100)\r\n\tsvalues[index] = val;\r\n\tthis.setValues(space, svalues);\r\n\r\n\treturn this;\r\n};\r\n\r\nif (typeof window !== 'undefined') {\r\n\twindow.Color = Color;\r\n}\r\n\r\nmodule.exports = Color;\r\n\r\n},{\"1\":1,\"4\":4}],3:[function(require,module,exports){\r\n/* MIT license */\r\n\r\nmodule.exports = {\r\n  rgb2hsl: rgb2hsl,\r\n  rgb2hsv: rgb2hsv,\r\n  rgb2hwb: rgb2hwb,\r\n  rgb2cmyk: rgb2cmyk,\r\n  rgb2keyword: rgb2keyword,\r\n  rgb2xyz: rgb2xyz,\r\n  rgb2lab: rgb2lab,\r\n  rgb2lch: rgb2lch,\r\n\r\n  hsl2rgb: hsl2rgb,\r\n  hsl2hsv: hsl2hsv,\r\n  hsl2hwb: hsl2hwb,\r\n  hsl2cmyk: hsl2cmyk,\r\n  hsl2keyword: hsl2keyword,\r\n\r\n  hsv2rgb: hsv2rgb,\r\n  hsv2hsl: hsv2hsl,\r\n  hsv2hwb: hsv2hwb,\r\n  hsv2cmyk: hsv2cmyk,\r\n  hsv2keyword: hsv2keyword,\r\n\r\n  hwb2rgb: hwb2rgb,\r\n  hwb2hsl: hwb2hsl,\r\n  hwb2hsv: hwb2hsv,\r\n  hwb2cmyk: hwb2cmyk,\r\n  hwb2keyword: hwb2keyword,\r\n\r\n  cmyk2rgb: cmyk2rgb,\r\n  cmyk2hsl: cmyk2hsl,\r\n  cmyk2hsv: cmyk2hsv,\r\n  cmyk2hwb: cmyk2hwb,\r\n  cmyk2keyword: cmyk2keyword,\r\n\r\n  keyword2rgb: keyword2rgb,\r\n  keyword2hsl: keyword2hsl,\r\n  keyword2hsv: keyword2hsv,\r\n  keyword2hwb: keyword2hwb,\r\n  keyword2cmyk: keyword2cmyk,\r\n  keyword2lab: keyword2lab,\r\n  keyword2xyz: keyword2xyz,\r\n\r\n  xyz2rgb: xyz2rgb,\r\n  xyz2lab: xyz2lab,\r\n  xyz2lch: xyz2lch,\r\n\r\n  lab2xyz: lab2xyz,\r\n  lab2rgb: lab2rgb,\r\n  lab2lch: lab2lch,\r\n\r\n  lch2lab: lch2lab,\r\n  lch2xyz: lch2xyz,\r\n  lch2rgb: lch2rgb\r\n}\r\n\r\n\r\nfunction rgb2hsl(rgb) {\r\n  var r = rgb[0]/255,\r\n      g = rgb[1]/255,\r\n      b = rgb[2]/255,\r\n      min = Math.min(r, g, b),\r\n      max = Math.max(r, g, b),\r\n      delta = max - min,\r\n      h, s, l;\r\n\r\n  if (max == min)\r\n    h = 0;\r\n  else if (r == max)\r\n    h = (g - b) / delta;\r\n  else if (g == max)\r\n    h = 2 + (b - r) / delta;\r\n  else if (b == max)\r\n    h = 4 + (r - g)/ delta;\r\n\r\n  h = Math.min(h * 60, 360);\r\n\r\n  if (h < 0)\r\n    h += 360;\r\n\r\n  l = (min + max) / 2;\r\n\r\n  if (max == min)\r\n    s = 0;\r\n  else if (l <= 0.5)\r\n    s = delta / (max + min);\r\n  else\r\n    s = delta / (2 - max - min);\r\n\r\n  return [h, s * 100, l * 100];\r\n}\r\n\r\nfunction rgb2hsv(rgb) {\r\n  var r = rgb[0],\r\n      g = rgb[1],\r\n      b = rgb[2],\r\n      min = Math.min(r, g, b),\r\n      max = Math.max(r, g, b),\r\n      delta = max - min,\r\n      h, s, v;\r\n\r\n  if (max == 0)\r\n    s = 0;\r\n  else\r\n    s = (delta/max * 1000)/10;\r\n\r\n  if (max == min)\r\n    h = 0;\r\n  else if (r == max)\r\n    h = (g - b) / delta;\r\n  else if (g == max)\r\n    h = 2 + (b - r) / delta;\r\n  else if (b == max)\r\n    h = 4 + (r - g) / delta;\r\n\r\n  h = Math.min(h * 60, 360);\r\n\r\n  if (h < 0)\r\n    h += 360;\r\n\r\n  v = ((max / 255) * 1000) / 10;\r\n\r\n  return [h, s, v];\r\n}\r\n\r\nfunction rgb2hwb(rgb) {\r\n  var r = rgb[0],\r\n      g = rgb[1],\r\n      b = rgb[2],\r\n      h = rgb2hsl(rgb)[0],\r\n      w = 1/255 * Math.min(r, Math.min(g, b)),\r\n      b = 1 - 1/255 * Math.max(r, Math.max(g, b));\r\n\r\n  return [h, w * 100, b * 100];\r\n}\r\n\r\nfunction rgb2cmyk(rgb) {\r\n  var r = rgb[0] / 255,\r\n      g = rgb[1] / 255,\r\n      b = rgb[2] / 255,\r\n      c, m, y, k;\r\n\r\n  k = Math.min(1 - r, 1 - g, 1 - b);\r\n  c = (1 - r - k) / (1 - k) || 0;\r\n  m = (1 - g - k) / (1 - k) || 0;\r\n  y = (1 - b - k) / (1 - k) || 0;\r\n  return [c * 100, m * 100, y * 100, k * 100];\r\n}\r\n\r\nfunction rgb2keyword(rgb) {\r\n  return reverseKeywords[JSON.stringify(rgb)];\r\n}\r\n\r\nfunction rgb2xyz(rgb) {\r\n  var r = rgb[0] / 255,\r\n      g = rgb[1] / 255,\r\n      b = rgb[2] / 255;\r\n\r\n  // assume sRGB\r\n  r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\r\n  g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\r\n  b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\r\n\r\n  var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\r\n  var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\r\n  var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\r\n\r\n  return [x * 100, y *100, z * 100];\r\n}\r\n\r\nfunction rgb2lab(rgb) {\r\n  var xyz = rgb2xyz(rgb),\r\n        x = xyz[0],\r\n        y = xyz[1],\r\n        z = xyz[2],\r\n        l, a, b;\r\n\r\n  x /= 95.047;\r\n  y /= 100;\r\n  z /= 108.883;\r\n\r\n  x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);\r\n  y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);\r\n  z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);\r\n\r\n  l = (116 * y) - 16;\r\n  a = 500 * (x - y);\r\n  b = 200 * (y - z);\r\n\r\n  return [l, a, b];\r\n}\r\n\r\nfunction rgb2lch(args) {\r\n  return lab2lch(rgb2lab(args));\r\n}\r\n\r\nfunction hsl2rgb(hsl) {\r\n  var h = hsl[0] / 360,\r\n      s = hsl[1] / 100,\r\n      l = hsl[2] / 100,\r\n      t1, t2, t3, rgb, val;\r\n\r\n  if (s == 0) {\r\n    val = l * 255;\r\n    return [val, val, val];\r\n  }\r\n\r\n  if (l < 0.5)\r\n    t2 = l * (1 + s);\r\n  else\r\n    t2 = l + s - l * s;\r\n  t1 = 2 * l - t2;\r\n\r\n  rgb = [0, 0, 0];\r\n  for (var i = 0; i < 3; i++) {\r\n    t3 = h + 1 / 3 * - (i - 1);\r\n    t3 < 0 && t3++;\r\n    t3 > 1 && t3--;\r\n\r\n    if (6 * t3 < 1)\r\n      val = t1 + (t2 - t1) * 6 * t3;\r\n    else if (2 * t3 < 1)\r\n      val = t2;\r\n    else if (3 * t3 < 2)\r\n      val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\r\n    else\r\n      val = t1;\r\n\r\n    rgb[i] = val * 255;\r\n  }\r\n\r\n  return rgb;\r\n}\r\n\r\nfunction hsl2hsv(hsl) {\r\n  var h = hsl[0],\r\n      s = hsl[1] / 100,\r\n      l = hsl[2] / 100,\r\n      sv, v;\r\n\r\n  if(l === 0) {\r\n      // no need to do calc on black\r\n      // also avoids divide by 0 error\r\n      return [0, 0, 0];\r\n  }\r\n\r\n  l *= 2;\r\n  s *= (l <= 1) ? l : 2 - l;\r\n  v = (l + s) / 2;\r\n  sv = (2 * s) / (l + s);\r\n  return [h, sv * 100, v * 100];\r\n}\r\n\r\nfunction hsl2hwb(args) {\r\n  return rgb2hwb(hsl2rgb(args));\r\n}\r\n\r\nfunction hsl2cmyk(args) {\r\n  return rgb2cmyk(hsl2rgb(args));\r\n}\r\n\r\nfunction hsl2keyword(args) {\r\n  return rgb2keyword(hsl2rgb(args));\r\n}\r\n\r\n\r\nfunction hsv2rgb(hsv) {\r\n  var h = hsv[0] / 60,\r\n      s = hsv[1] / 100,\r\n      v = hsv[2] / 100,\r\n      hi = Math.floor(h) % 6;\r\n\r\n  var f = h - Math.floor(h),\r\n      p = 255 * v * (1 - s),\r\n      q = 255 * v * (1 - (s * f)),\r\n      t = 255 * v * (1 - (s * (1 - f))),\r\n      v = 255 * v;\r\n\r\n  switch(hi) {\r\n    case 0:\r\n      return [v, t, p];\r\n    case 1:\r\n      return [q, v, p];\r\n    case 2:\r\n      return [p, v, t];\r\n    case 3:\r\n      return [p, q, v];\r\n    case 4:\r\n      return [t, p, v];\r\n    case 5:\r\n      return [v, p, q];\r\n  }\r\n}\r\n\r\nfunction hsv2hsl(hsv) {\r\n  var h = hsv[0],\r\n      s = hsv[1] / 100,\r\n      v = hsv[2] / 100,\r\n      sl, l;\r\n\r\n  l = (2 - s) * v;\r\n  sl = s * v;\r\n  sl /= (l <= 1) ? l : 2 - l;\r\n  sl = sl || 0;\r\n  l /= 2;\r\n  return [h, sl * 100, l * 100];\r\n}\r\n\r\nfunction hsv2hwb(args) {\r\n  return rgb2hwb(hsv2rgb(args))\r\n}\r\n\r\nfunction hsv2cmyk(args) {\r\n  return rgb2cmyk(hsv2rgb(args));\r\n}\r\n\r\nfunction hsv2keyword(args) {\r\n  return rgb2keyword(hsv2rgb(args));\r\n}\r\n\r\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\r\nfunction hwb2rgb(hwb) {\r\n  var h = hwb[0] / 360,\r\n      wh = hwb[1] / 100,\r\n      bl = hwb[2] / 100,\r\n      ratio = wh + bl,\r\n      i, v, f, n;\r\n\r\n  // wh + bl cant be > 1\r\n  if (ratio > 1) {\r\n    wh /= ratio;\r\n    bl /= ratio;\r\n  }\r\n\r\n  i = Math.floor(6 * h);\r\n  v = 1 - bl;\r\n  f = 6 * h - i;\r\n  if ((i & 0x01) != 0) {\r\n    f = 1 - f;\r\n  }\r\n  n = wh + f * (v - wh);  // linear interpolation\r\n\r\n  switch (i) {\r\n    default:\r\n    case 6:\r\n    case 0: r = v; g = n; b = wh; break;\r\n    case 1: r = n; g = v; b = wh; break;\r\n    case 2: r = wh; g = v; b = n; break;\r\n    case 3: r = wh; g = n; b = v; break;\r\n    case 4: r = n; g = wh; b = v; break;\r\n    case 5: r = v; g = wh; b = n; break;\r\n  }\r\n\r\n  return [r * 255, g * 255, b * 255];\r\n}\r\n\r\nfunction hwb2hsl(args) {\r\n  return rgb2hsl(hwb2rgb(args));\r\n}\r\n\r\nfunction hwb2hsv(args) {\r\n  return rgb2hsv(hwb2rgb(args));\r\n}\r\n\r\nfunction hwb2cmyk(args) {\r\n  return rgb2cmyk(hwb2rgb(args));\r\n}\r\n\r\nfunction hwb2keyword(args) {\r\n  return rgb2keyword(hwb2rgb(args));\r\n}\r\n\r\nfunction cmyk2rgb(cmyk) {\r\n  var c = cmyk[0] / 100,\r\n      m = cmyk[1] / 100,\r\n      y = cmyk[2] / 100,\r\n      k = cmyk[3] / 100,\r\n      r, g, b;\r\n\r\n  r = 1 - Math.min(1, c * (1 - k) + k);\r\n  g = 1 - Math.min(1, m * (1 - k) + k);\r\n  b = 1 - Math.min(1, y * (1 - k) + k);\r\n  return [r * 255, g * 255, b * 255];\r\n}\r\n\r\nfunction cmyk2hsl(args) {\r\n  return rgb2hsl(cmyk2rgb(args));\r\n}\r\n\r\nfunction cmyk2hsv(args) {\r\n  return rgb2hsv(cmyk2rgb(args));\r\n}\r\n\r\nfunction cmyk2hwb(args) {\r\n  return rgb2hwb(cmyk2rgb(args));\r\n}\r\n\r\nfunction cmyk2keyword(args) {\r\n  return rgb2keyword(cmyk2rgb(args));\r\n}\r\n\r\n\r\nfunction xyz2rgb(xyz) {\r\n  var x = xyz[0] / 100,\r\n      y = xyz[1] / 100,\r\n      z = xyz[2] / 100,\r\n      r, g, b;\r\n\r\n  r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\r\n  g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\r\n  b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\r\n\r\n  // assume sRGB\r\n  r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\r\n    : r = (r * 12.92);\r\n\r\n  g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\r\n    : g = (g * 12.92);\r\n\r\n  b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\r\n    : b = (b * 12.92);\r\n\r\n  r = Math.min(Math.max(0, r), 1);\r\n  g = Math.min(Math.max(0, g), 1);\r\n  b = Math.min(Math.max(0, b), 1);\r\n\r\n  return [r * 255, g * 255, b * 255];\r\n}\r\n\r\nfunction xyz2lab(xyz) {\r\n  var x = xyz[0],\r\n      y = xyz[1],\r\n      z = xyz[2],\r\n      l, a, b;\r\n\r\n  x /= 95.047;\r\n  y /= 100;\r\n  z /= 108.883;\r\n\r\n  x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);\r\n  y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);\r\n  z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);\r\n\r\n  l = (116 * y) - 16;\r\n  a = 500 * (x - y);\r\n  b = 200 * (y - z);\r\n\r\n  return [l, a, b];\r\n}\r\n\r\nfunction xyz2lch(args) {\r\n  return lab2lch(xyz2lab(args));\r\n}\r\n\r\nfunction lab2xyz(lab) {\r\n  var l = lab[0],\r\n      a = lab[1],\r\n      b = lab[2],\r\n      x, y, z, y2;\r\n\r\n  if (l <= 8) {\r\n    y = (l * 100) / 903.3;\r\n    y2 = (7.787 * (y / 100)) + (16 / 116);\r\n  } else {\r\n    y = 100 * Math.pow((l + 16) / 116, 3);\r\n    y2 = Math.pow(y / 100, 1/3);\r\n  }\r\n\r\n  x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3);\r\n\r\n  z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3);\r\n\r\n  return [x, y, z];\r\n}\r\n\r\nfunction lab2lch(lab) {\r\n  var l = lab[0],\r\n      a = lab[1],\r\n      b = lab[2],\r\n      hr, h, c;\r\n\r\n  hr = Math.atan2(b, a);\r\n  h = hr * 360 / 2 / Math.PI;\r\n  if (h < 0) {\r\n    h += 360;\r\n  }\r\n  c = Math.sqrt(a * a + b * b);\r\n  return [l, c, h];\r\n}\r\n\r\nfunction lab2rgb(args) {\r\n  return xyz2rgb(lab2xyz(args));\r\n}\r\n\r\nfunction lch2lab(lch) {\r\n  var l = lch[0],\r\n      c = lch[1],\r\n      h = lch[2],\r\n      a, b, hr;\r\n\r\n  hr = h / 360 * 2 * Math.PI;\r\n  a = c * Math.cos(hr);\r\n  b = c * Math.sin(hr);\r\n  return [l, a, b];\r\n}\r\n\r\nfunction lch2xyz(args) {\r\n  return lab2xyz(lch2lab(args));\r\n}\r\n\r\nfunction lch2rgb(args) {\r\n  return lab2rgb(lch2lab(args));\r\n}\r\n\r\nfunction keyword2rgb(keyword) {\r\n  return cssKeywords[keyword];\r\n}\r\n\r\nfunction keyword2hsl(args) {\r\n  return rgb2hsl(keyword2rgb(args));\r\n}\r\n\r\nfunction keyword2hsv(args) {\r\n  return rgb2hsv(keyword2rgb(args));\r\n}\r\n\r\nfunction keyword2hwb(args) {\r\n  return rgb2hwb(keyword2rgb(args));\r\n}\r\n\r\nfunction keyword2cmyk(args) {\r\n  return rgb2cmyk(keyword2rgb(args));\r\n}\r\n\r\nfunction keyword2lab(args) {\r\n  return rgb2lab(keyword2rgb(args));\r\n}\r\n\r\nfunction keyword2xyz(args) {\r\n  return rgb2xyz(keyword2rgb(args));\r\n}\r\n\r\nvar cssKeywords = {\r\n  aliceblue:  [240,248,255],\r\n  antiquewhite: [250,235,215],\r\n  aqua: [0,255,255],\r\n  aquamarine: [127,255,212],\r\n  azure:  [240,255,255],\r\n  beige:  [245,245,220],\r\n  bisque: [255,228,196],\r\n  black:  [0,0,0],\r\n  blanchedalmond: [255,235,205],\r\n  blue: [0,0,255],\r\n  blueviolet: [138,43,226],\r\n  brown:  [165,42,42],\r\n  burlywood:  [222,184,135],\r\n  cadetblue:  [95,158,160],\r\n  chartreuse: [127,255,0],\r\n  chocolate:  [210,105,30],\r\n  coral:  [255,127,80],\r\n  cornflowerblue: [100,149,237],\r\n  cornsilk: [255,248,220],\r\n  crimson:  [220,20,60],\r\n  cyan: [0,255,255],\r\n  darkblue: [0,0,139],\r\n  darkcyan: [0,139,139],\r\n  darkgoldenrod:  [184,134,11],\r\n  darkgray: [169,169,169],\r\n  darkgreen:  [0,100,0],\r\n  darkgrey: [169,169,169],\r\n  darkkhaki:  [189,183,107],\r\n  darkmagenta:  [139,0,139],\r\n  darkolivegreen: [85,107,47],\r\n  darkorange: [255,140,0],\r\n  darkorchid: [153,50,204],\r\n  darkred:  [139,0,0],\r\n  darksalmon: [233,150,122],\r\n  darkseagreen: [143,188,143],\r\n  darkslateblue:  [72,61,139],\r\n  darkslategray:  [47,79,79],\r\n  darkslategrey:  [47,79,79],\r\n  darkturquoise:  [0,206,209],\r\n  darkviolet: [148,0,211],\r\n  deeppink: [255,20,147],\r\n  deepskyblue:  [0,191,255],\r\n  dimgray:  [105,105,105],\r\n  dimgrey:  [105,105,105],\r\n  dodgerblue: [30,144,255],\r\n  firebrick:  [178,34,34],\r\n  floralwhite:  [255,250,240],\r\n  forestgreen:  [34,139,34],\r\n  fuchsia:  [255,0,255],\r\n  gainsboro:  [220,220,220],\r\n  ghostwhite: [248,248,255],\r\n  gold: [255,215,0],\r\n  goldenrod:  [218,165,32],\r\n  gray: [128,128,128],\r\n  green:  [0,128,0],\r\n  greenyellow:  [173,255,47],\r\n  grey: [128,128,128],\r\n  honeydew: [240,255,240],\r\n  hotpink:  [255,105,180],\r\n  indianred:  [205,92,92],\r\n  indigo: [75,0,130],\r\n  ivory:  [255,255,240],\r\n  khaki:  [240,230,140],\r\n  lavender: [230,230,250],\r\n  lavenderblush:  [255,240,245],\r\n  lawngreen:  [124,252,0],\r\n  lemonchiffon: [255,250,205],\r\n  lightblue:  [173,216,230],\r\n  lightcoral: [240,128,128],\r\n  lightcyan:  [224,255,255],\r\n  lightgoldenrodyellow: [250,250,210],\r\n  lightgray:  [211,211,211],\r\n  lightgreen: [144,238,144],\r\n  lightgrey:  [211,211,211],\r\n  lightpink:  [255,182,193],\r\n  lightsalmon:  [255,160,122],\r\n  lightseagreen:  [32,178,170],\r\n  lightskyblue: [135,206,250],\r\n  lightslategray: [119,136,153],\r\n  lightslategrey: [119,136,153],\r\n  lightsteelblue: [176,196,222],\r\n  lightyellow:  [255,255,224],\r\n  lime: [0,255,0],\r\n  limegreen:  [50,205,50],\r\n  linen:  [250,240,230],\r\n  magenta:  [255,0,255],\r\n  maroon: [128,0,0],\r\n  mediumaquamarine: [102,205,170],\r\n  mediumblue: [0,0,205],\r\n  mediumorchid: [186,85,211],\r\n  mediumpurple: [147,112,219],\r\n  mediumseagreen: [60,179,113],\r\n  mediumslateblue:  [123,104,238],\r\n  mediumspringgreen:  [0,250,154],\r\n  mediumturquoise:  [72,209,204],\r\n  mediumvioletred:  [199,21,133],\r\n  midnightblue: [25,25,112],\r\n  mintcream:  [245,255,250],\r\n  mistyrose:  [255,228,225],\r\n  moccasin: [255,228,181],\r\n  navajowhite:  [255,222,173],\r\n  navy: [0,0,128],\r\n  oldlace:  [253,245,230],\r\n  olive:  [128,128,0],\r\n  olivedrab:  [107,142,35],\r\n  orange: [255,165,0],\r\n  orangered:  [255,69,0],\r\n  orchid: [218,112,214],\r\n  palegoldenrod:  [238,232,170],\r\n  palegreen:  [152,251,152],\r\n  paleturquoise:  [175,238,238],\r\n  palevioletred:  [219,112,147],\r\n  papayawhip: [255,239,213],\r\n  peachpuff:  [255,218,185],\r\n  peru: [205,133,63],\r\n  pink: [255,192,203],\r\n  plum: [221,160,221],\r\n  powderblue: [176,224,230],\r\n  purple: [128,0,128],\r\n  rebeccapurple: [102, 51, 153],\r\n  red:  [255,0,0],\r\n  rosybrown:  [188,143,143],\r\n  royalblue:  [65,105,225],\r\n  saddlebrown:  [139,69,19],\r\n  salmon: [250,128,114],\r\n  sandybrown: [244,164,96],\r\n  seagreen: [46,139,87],\r\n  seashell: [255,245,238],\r\n  sienna: [160,82,45],\r\n  silver: [192,192,192],\r\n  skyblue:  [135,206,235],\r\n  slateblue:  [106,90,205],\r\n  slategray:  [112,128,144],\r\n  slategrey:  [112,128,144],\r\n  snow: [255,250,250],\r\n  springgreen:  [0,255,127],\r\n  steelblue:  [70,130,180],\r\n  tan:  [210,180,140],\r\n  teal: [0,128,128],\r\n  thistle:  [216,191,216],\r\n  tomato: [255,99,71],\r\n  turquoise:  [64,224,208],\r\n  violet: [238,130,238],\r\n  wheat:  [245,222,179],\r\n  white:  [255,255,255],\r\n  whitesmoke: [245,245,245],\r\n  yellow: [255,255,0],\r\n  yellowgreen:  [154,205,50]\r\n};\r\n\r\nvar reverseKeywords = {};\r\nfor (var key in cssKeywords) {\r\n  reverseKeywords[JSON.stringify(cssKeywords[key])] = key;\r\n}\r\n\r\n},{}],4:[function(require,module,exports){\r\nvar conversions = require(3);\r\n\r\nvar convert = function() {\r\n   return new Converter();\r\n}\r\n\r\nfor (var func in conversions) {\r\n  // export Raw versions\r\n  convert[func + \"Raw\"] =  (function(func) {\r\n    // accept array or plain args\r\n    return function(arg) {\r\n      if (typeof arg == \"number\")\r\n        arg = Array.prototype.slice.call(arguments);\r\n      return conversions[func](arg);\r\n    }\r\n  })(func);\r\n\r\n  var pair = /(\\w+)2(\\w+)/.exec(func),\r\n      from = pair[1],\r\n      to = pair[2];\r\n\r\n  // export rgb2hsl and [\"rgb\"][\"hsl\"]\r\n  convert[from] = convert[from] || {};\r\n\r\n  convert[from][to] = convert[func] = (function(func) { \r\n    return function(arg) {\r\n      if (typeof arg == \"number\")\r\n        arg = Array.prototype.slice.call(arguments);\r\n      \r\n      var val = conversions[func](arg);\r\n      if (typeof val == \"string\" || val === undefined)\r\n        return val; // keyword\r\n\r\n      for (var i = 0; i < val.length; i++)\r\n        val[i] = Math.round(val[i]);\r\n      return val;\r\n    }\r\n  })(func);\r\n}\r\n\r\n\r\n/* Converter does lazy conversion and caching */\r\nvar Converter = function() {\r\n   this.convs = {};\r\n};\r\n\r\n/* Either get the values for a space or\r\n  set the values for a space, depending on args */\r\nConverter.prototype.routeSpace = function(space, args) {\r\n   var values = args[0];\r\n   if (values === undefined) {\r\n      // color.rgb()\r\n      return this.getValues(space);\r\n   }\r\n   // color.rgb(10, 10, 10)\r\n   if (typeof values == \"number\") {\r\n      values = Array.prototype.slice.call(args);        \r\n   }\r\n\r\n   return this.setValues(space, values);\r\n};\r\n  \r\n/* Set the values for a space, invalidating cache */\r\nConverter.prototype.setValues = function(space, values) {\r\n   this.space = space;\r\n   this.convs = {};\r\n   this.convs[space] = values;\r\n   return this;\r\n};\r\n\r\n/* Get the values for a space. If there's already\r\n  a conversion for the space, fetch it, otherwise\r\n  compute it */\r\nConverter.prototype.getValues = function(space) {\r\n   var vals = this.convs[space];\r\n   if (!vals) {\r\n      var fspace = this.space,\r\n          from = this.convs[fspace];\r\n      vals = convert[fspace][space](from);\r\n\r\n      this.convs[space] = vals;\r\n   }\r\n  return vals;\r\n};\r\n\r\n[\"rgb\", \"hsl\", \"hsv\", \"cmyk\", \"keyword\"].forEach(function(space) {\r\n   Converter.prototype[space] = function(vals) {\r\n      return this.routeSpace(space, arguments);\r\n   }\r\n});\r\n\r\nmodule.exports = convert;\r\n},{\"3\":3}],5:[function(require,module,exports){\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n},{}],6:[function(require,module,exports){\r\n//! moment.js\r\n//! version : 2.14.1\r\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\r\n//! license : MIT\r\n//! momentjs.com\r\n\r\n;(function (global, factory) {\r\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n    typeof define === 'function' && define.amd ? define(factory) :\r\n    global.moment = factory()\r\n}(this, function () { 'use strict';\r\n\r\n    var hookCallback;\r\n\r\n    function utils_hooks__hooks () {\r\n        return hookCallback.apply(null, arguments);\r\n    }\r\n\r\n    // This is done to register the method called with moment()\r\n    // without creating circular dependencies.\r\n    function setHookCallback (callback) {\r\n        hookCallback = callback;\r\n    }\r\n\r\n    function isArray(input) {\r\n        return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\r\n    }\r\n\r\n    function isObject(input) {\r\n        return Object.prototype.toString.call(input) === '[object Object]';\r\n    }\r\n\r\n    function isObjectEmpty(obj) {\r\n        var k;\r\n        for (k in obj) {\r\n            // even if its not own property I'd still call it non-empty\r\n            return false;\r\n        }\r\n        return true;\r\n    }\r\n\r\n    function isDate(input) {\r\n        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\r\n    }\r\n\r\n    function map(arr, fn) {\r\n        var res = [], i;\r\n        for (i = 0; i < arr.length; ++i) {\r\n            res.push(fn(arr[i], i));\r\n        }\r\n        return res;\r\n    }\r\n\r\n    function hasOwnProp(a, b) {\r\n        return Object.prototype.hasOwnProperty.call(a, b);\r\n    }\r\n\r\n    function extend(a, b) {\r\n        for (var i in b) {\r\n            if (hasOwnProp(b, i)) {\r\n                a[i] = b[i];\r\n            }\r\n        }\r\n\r\n        if (hasOwnProp(b, 'toString')) {\r\n            a.toString = b.toString;\r\n        }\r\n\r\n        if (hasOwnProp(b, 'valueOf')) {\r\n            a.valueOf = b.valueOf;\r\n        }\r\n\r\n        return a;\r\n    }\r\n\r\n    function create_utc__createUTC (input, format, locale, strict) {\r\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\r\n    }\r\n\r\n    function defaultParsingFlags() {\r\n        // We need to deep clone this object.\r\n        return {\r\n            empty           : false,\r\n            unusedTokens    : [],\r\n            unusedInput     : [],\r\n            overflow        : -2,\r\n            charsLeftOver   : 0,\r\n            nullInput       : false,\r\n            invalidMonth    : null,\r\n            invalidFormat   : false,\r\n            userInvalidated : false,\r\n            iso             : false,\r\n            parsedDateParts : [],\r\n            meridiem        : null\r\n        };\r\n    }\r\n\r\n    function getParsingFlags(m) {\r\n        if (m._pf == null) {\r\n            m._pf = defaultParsingFlags();\r\n        }\r\n        return m._pf;\r\n    }\r\n\r\n    var some;\r\n    if (Array.prototype.some) {\r\n        some = Array.prototype.some;\r\n    } else {\r\n        some = function (fun) {\r\n            var t = Object(this);\r\n            var len = t.length >>> 0;\r\n\r\n            for (var i = 0; i < len; i++) {\r\n                if (i in t && fun.call(this, t[i], i, t)) {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        };\r\n    }\r\n\r\n    function valid__isValid(m) {\r\n        if (m._isValid == null) {\r\n            var flags = getParsingFlags(m);\r\n            var parsedParts = some.call(flags.parsedDateParts, function (i) {\r\n                return i != null;\r\n            });\r\n            m._isValid = !isNaN(m._d.getTime()) &&\r\n                flags.overflow < 0 &&\r\n                !flags.empty &&\r\n                !flags.invalidMonth &&\r\n                !flags.invalidWeekday &&\r\n                !flags.nullInput &&\r\n                !flags.invalidFormat &&\r\n                !flags.userInvalidated &&\r\n                (!flags.meridiem || (flags.meridiem && parsedParts));\r\n\r\n            if (m._strict) {\r\n                m._isValid = m._isValid &&\r\n                    flags.charsLeftOver === 0 &&\r\n                    flags.unusedTokens.length === 0 &&\r\n                    flags.bigHour === undefined;\r\n            }\r\n        }\r\n        return m._isValid;\r\n    }\r\n\r\n    function valid__createInvalid (flags) {\r\n        var m = create_utc__createUTC(NaN);\r\n        if (flags != null) {\r\n            extend(getParsingFlags(m), flags);\r\n        }\r\n        else {\r\n            getParsingFlags(m).userInvalidated = true;\r\n        }\r\n\r\n        return m;\r\n    }\r\n\r\n    function isUndefined(input) {\r\n        return input === void 0;\r\n    }\r\n\r\n    // Plugins that add properties should also add the key here (null value),\r\n    // so we can properly clone ourselves.\r\n    var momentProperties = utils_hooks__hooks.momentProperties = [];\r\n\r\n    function copyConfig(to, from) {\r\n        var i, prop, val;\r\n\r\n        if (!isUndefined(from._isAMomentObject)) {\r\n            to._isAMomentObject = from._isAMomentObject;\r\n        }\r\n        if (!isUndefined(from._i)) {\r\n            to._i = from._i;\r\n        }\r\n        if (!isUndefined(from._f)) {\r\n            to._f = from._f;\r\n        }\r\n        if (!isUndefined(from._l)) {\r\n            to._l = from._l;\r\n        }\r\n        if (!isUndefined(from._strict)) {\r\n            to._strict = from._strict;\r\n        }\r\n        if (!isUndefined(from._tzm)) {\r\n            to._tzm = from._tzm;\r\n        }\r\n        if (!isUndefined(from._isUTC)) {\r\n            to._isUTC = from._isUTC;\r\n        }\r\n        if (!isUndefined(from._offset)) {\r\n            to._offset = from._offset;\r\n        }\r\n        if (!isUndefined(from._pf)) {\r\n            to._pf = getParsingFlags(from);\r\n        }\r\n        if (!isUndefined(from._locale)) {\r\n            to._locale = from._locale;\r\n        }\r\n\r\n        if (momentProperties.length > 0) {\r\n            for (i in momentProperties) {\r\n                prop = momentProperties[i];\r\n                val = from[prop];\r\n                if (!isUndefined(val)) {\r\n                    to[prop] = val;\r\n                }\r\n            }\r\n        }\r\n\r\n        return to;\r\n    }\r\n\r\n    var updateInProgress = false;\r\n\r\n    // Moment prototype object\r\n    function Moment(config) {\r\n        copyConfig(this, config);\r\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\r\n        // Prevent infinite loop in case updateOffset creates new moment\r\n        // objects.\r\n        if (updateInProgress === false) {\r\n            updateInProgress = true;\r\n            utils_hooks__hooks.updateOffset(this);\r\n            updateInProgress = false;\r\n        }\r\n    }\r\n\r\n    function isMoment (obj) {\r\n        return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\r\n    }\r\n\r\n    function absFloor (number) {\r\n        if (number < 0) {\r\n            // -0 -> 0\r\n            return Math.ceil(number) || 0;\r\n        } else {\r\n            return Math.floor(number);\r\n        }\r\n    }\r\n\r\n    function toInt(argumentForCoercion) {\r\n        var coercedNumber = +argumentForCoercion,\r\n            value = 0;\r\n\r\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\r\n            value = absFloor(coercedNumber);\r\n        }\r\n\r\n        return value;\r\n    }\r\n\r\n    // compare two arrays, return the number of differences\r\n    function compareArrays(array1, array2, dontConvert) {\r\n        var len = Math.min(array1.length, array2.length),\r\n            lengthDiff = Math.abs(array1.length - array2.length),\r\n            diffs = 0,\r\n            i;\r\n        for (i = 0; i < len; i++) {\r\n            if ((dontConvert && array1[i] !== array2[i]) ||\r\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\r\n                diffs++;\r\n            }\r\n        }\r\n        return diffs + lengthDiff;\r\n    }\r\n\r\n    function warn(msg) {\r\n        if (utils_hooks__hooks.suppressDeprecationWarnings === false &&\r\n                (typeof console !==  'undefined') && console.warn) {\r\n            console.warn('Deprecation warning: ' + msg);\r\n        }\r\n    }\r\n\r\n    function deprecate(msg, fn) {\r\n        var firstTime = true;\r\n\r\n        return extend(function () {\r\n            if (utils_hooks__hooks.deprecationHandler != null) {\r\n                utils_hooks__hooks.deprecationHandler(null, msg);\r\n            }\r\n            if (firstTime) {\r\n                warn(msg + '\\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\\n' + (new Error()).stack);\r\n                firstTime = false;\r\n            }\r\n            return fn.apply(this, arguments);\r\n        }, fn);\r\n    }\r\n\r\n    var deprecations = {};\r\n\r\n    function deprecateSimple(name, msg) {\r\n        if (utils_hooks__hooks.deprecationHandler != null) {\r\n            utils_hooks__hooks.deprecationHandler(name, msg);\r\n        }\r\n        if (!deprecations[name]) {\r\n            warn(msg);\r\n            deprecations[name] = true;\r\n        }\r\n    }\r\n\r\n    utils_hooks__hooks.suppressDeprecationWarnings = false;\r\n    utils_hooks__hooks.deprecationHandler = null;\r\n\r\n    function isFunction(input) {\r\n        return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\r\n    }\r\n\r\n    function locale_set__set (config) {\r\n        var prop, i;\r\n        for (i in config) {\r\n            prop = config[i];\r\n            if (isFunction(prop)) {\r\n                this[i] = prop;\r\n            } else {\r\n                this['_' + i] = prop;\r\n            }\r\n        }\r\n        this._config = config;\r\n        // Lenient ordinal parsing accepts just a number in addition to\r\n        // number + (possibly) stuff coming from _ordinalParseLenient.\r\n        this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\r\n    }\r\n\r\n    function mergeConfigs(parentConfig, childConfig) {\r\n        var res = extend({}, parentConfig), prop;\r\n        for (prop in childConfig) {\r\n            if (hasOwnProp(childConfig, prop)) {\r\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\r\n                    res[prop] = {};\r\n                    extend(res[prop], parentConfig[prop]);\r\n                    extend(res[prop], childConfig[prop]);\r\n                } else if (childConfig[prop] != null) {\r\n                    res[prop] = childConfig[prop];\r\n                } else {\r\n                    delete res[prop];\r\n                }\r\n            }\r\n        }\r\n        for (prop in parentConfig) {\r\n            if (hasOwnProp(parentConfig, prop) &&\r\n                    !hasOwnProp(childConfig, prop) &&\r\n                    isObject(parentConfig[prop])) {\r\n                // make sure changes to properties don't modify parent config\r\n                res[prop] = extend({}, res[prop]);\r\n            }\r\n        }\r\n        return res;\r\n    }\r\n\r\n    function Locale(config) {\r\n        if (config != null) {\r\n            this.set(config);\r\n        }\r\n    }\r\n\r\n    var keys;\r\n\r\n    if (Object.keys) {\r\n        keys = Object.keys;\r\n    } else {\r\n        keys = function (obj) {\r\n            var i, res = [];\r\n            for (i in obj) {\r\n                if (hasOwnProp(obj, i)) {\r\n                    res.push(i);\r\n                }\r\n            }\r\n            return res;\r\n        };\r\n    }\r\n\r\n    var defaultCalendar = {\r\n        sameDay : '[Today at] LT',\r\n        nextDay : '[Tomorrow at] LT',\r\n        nextWeek : 'dddd [at] LT',\r\n        lastDay : '[Yesterday at] LT',\r\n        lastWeek : '[Last] dddd [at] LT',\r\n        sameElse : 'L'\r\n    };\r\n\r\n    function locale_calendar__calendar (key, mom, now) {\r\n        var output = this._calendar[key] || this._calendar['sameElse'];\r\n        return isFunction(output) ? output.call(mom, now) : output;\r\n    }\r\n\r\n    var defaultLongDateFormat = {\r\n        LTS  : 'h:mm:ss A',\r\n        LT   : 'h:mm A',\r\n        L    : 'MM/DD/YYYY',\r\n        LL   : 'MMMM D, YYYY',\r\n        LLL  : 'MMMM D, YYYY h:mm A',\r\n        LLLL : 'dddd, MMMM D, YYYY h:mm A'\r\n    };\r\n\r\n    function longDateFormat (key) {\r\n        var format = this._longDateFormat[key],\r\n            formatUpper = this._longDateFormat[key.toUpperCase()];\r\n\r\n        if (format || !formatUpper) {\r\n            return format;\r\n        }\r\n\r\n        this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\r\n            return val.slice(1);\r\n        });\r\n\r\n        return this._longDateFormat[key];\r\n    }\r\n\r\n    var defaultInvalidDate = 'Invalid date';\r\n\r\n    function invalidDate () {\r\n        return this._invalidDate;\r\n    }\r\n\r\n    var defaultOrdinal = '%d';\r\n    var defaultOrdinalParse = /\\d{1,2}/;\r\n\r\n    function ordinal (number) {\r\n        return this._ordinal.replace('%d', number);\r\n    }\r\n\r\n    var defaultRelativeTime = {\r\n        future : 'in %s',\r\n        past   : '%s ago',\r\n        s  : 'a few seconds',\r\n        m  : 'a minute',\r\n        mm : '%d minutes',\r\n        h  : 'an hour',\r\n        hh : '%d hours',\r\n        d  : 'a day',\r\n        dd : '%d days',\r\n        M  : 'a month',\r\n        MM : '%d months',\r\n        y  : 'a year',\r\n        yy : '%d years'\r\n    };\r\n\r\n    function relative__relativeTime (number, withoutSuffix, string, isFuture) {\r\n        var output = this._relativeTime[string];\r\n        return (isFunction(output)) ?\r\n            output(number, withoutSuffix, string, isFuture) :\r\n            output.replace(/%d/i, number);\r\n    }\r\n\r\n    function pastFuture (diff, output) {\r\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\r\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\r\n    }\r\n\r\n    var aliases = {};\r\n\r\n    function addUnitAlias (unit, shorthand) {\r\n        var lowerCase = unit.toLowerCase();\r\n        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\r\n    }\r\n\r\n    function normalizeUnits(units) {\r\n        return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\r\n    }\r\n\r\n    function normalizeObjectUnits(inputObject) {\r\n        var normalizedInput = {},\r\n            normalizedProp,\r\n            prop;\r\n\r\n        for (prop in inputObject) {\r\n            if (hasOwnProp(inputObject, prop)) {\r\n                normalizedProp = normalizeUnits(prop);\r\n                if (normalizedProp) {\r\n                    normalizedInput[normalizedProp] = inputObject[prop];\r\n                }\r\n            }\r\n        }\r\n\r\n        return normalizedInput;\r\n    }\r\n\r\n    var priorities = {};\r\n\r\n    function addUnitPriority(unit, priority) {\r\n        priorities[unit] = priority;\r\n    }\r\n\r\n    function getPrioritizedUnits(unitsObj) {\r\n        var units = [];\r\n        for (var u in unitsObj) {\r\n            units.push({unit: u, priority: priorities[u]});\r\n        }\r\n        units.sort(function (a, b) {\r\n            return a.priority - b.priority;\r\n        });\r\n        return units;\r\n    }\r\n\r\n    function makeGetSet (unit, keepTime) {\r\n        return function (value) {\r\n            if (value != null) {\r\n                get_set__set(this, unit, value);\r\n                utils_hooks__hooks.updateOffset(this, keepTime);\r\n                return this;\r\n            } else {\r\n                return get_set__get(this, unit);\r\n            }\r\n        };\r\n    }\r\n\r\n    function get_set__get (mom, unit) {\r\n        return mom.isValid() ?\r\n            mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\r\n    }\r\n\r\n    function get_set__set (mom, unit, value) {\r\n        if (mom.isValid()) {\r\n            mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\r\n        }\r\n    }\r\n\r\n    // MOMENTS\r\n\r\n    function stringGet (units) {\r\n        units = normalizeUnits(units);\r\n        if (isFunction(this[units])) {\r\n            return this[units]();\r\n        }\r\n        return this;\r\n    }\r\n\r\n\r\n    function stringSet (units, value) {\r\n        if (typeof units === 'object') {\r\n            units = normalizeObjectUnits(units);\r\n            var prioritized = getPrioritizedUnits(units);\r\n            for (var i = 0; i < prioritized.length; i++) {\r\n                this[prioritized[i].unit](units[prioritized[i].unit]);\r\n            }\r\n        } else {\r\n            units = normalizeUnits(units);\r\n            if (isFunction(this[units])) {\r\n                return this[units](value);\r\n            }\r\n        }\r\n        return this;\r\n    }\r\n\r\n    function zeroFill(number, targetLength, forceSign) {\r\n        var absNumber = '' + Math.abs(number),\r\n            zerosToFill = targetLength - absNumber.length,\r\n            sign = number >= 0;\r\n        return (sign ? (forceSign ? '+' : '') : '-') +\r\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\r\n    }\r\n\r\n    var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\r\n\r\n    var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\r\n\r\n    var formatFunctions = {};\r\n\r\n    var formatTokenFunctions = {};\r\n\r\n    // token:    'M'\r\n    // padded:   ['MM', 2]\r\n    // ordinal:  'Mo'\r\n    // callback: function () { this.month() + 1 }\r\n    function addFormatToken (token, padded, ordinal, callback) {\r\n        var func = callback;\r\n        if (typeof callback === 'string') {\r\n            func = function () {\r\n                return this[callback]();\r\n            };\r\n        }\r\n        if (token) {\r\n            formatTokenFunctions[token] = func;\r\n        }\r\n        if (padded) {\r\n            formatTokenFunctions[padded[0]] = function () {\r\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\r\n            };\r\n        }\r\n        if (ordinal) {\r\n            formatTokenFunctions[ordinal] = function () {\r\n                return this.localeData().ordinal(func.apply(this, arguments), token);\r\n            };\r\n        }\r\n    }\r\n\r\n    function removeFormattingTokens(input) {\r\n        if (input.match(/\\[[\\s\\S]/)) {\r\n            return input.replace(/^\\[|\\]$/g, '');\r\n        }\r\n        return input.replace(/\\\\/g, '');\r\n    }\r\n\r\n    function makeFormatFunction(format) {\r\n        var array = format.match(formattingTokens), i, length;\r\n\r\n        for (i = 0, length = array.length; i < length; i++) {\r\n            if (formatTokenFunctions[array[i]]) {\r\n                array[i] = formatTokenFunctions[array[i]];\r\n            } else {\r\n                array[i] = removeFormattingTokens(array[i]);\r\n            }\r\n        }\r\n\r\n        return function (mom) {\r\n            var output = '', i;\r\n            for (i = 0; i < length; i++) {\r\n                output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\r\n            }\r\n            return output;\r\n        };\r\n    }\r\n\r\n    // format date using native date object\r\n    function formatMoment(m, format) {\r\n        if (!m.isValid()) {\r\n            return m.localeData().invalidDate();\r\n        }\r\n\r\n        format = expandFormat(format, m.localeData());\r\n        formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\r\n\r\n        return formatFunctions[format](m);\r\n    }\r\n\r\n    function expandFormat(format, locale) {\r\n        var i = 5;\r\n\r\n        function replaceLongDateFormatTokens(input) {\r\n            return locale.longDateFormat(input) || input;\r\n        }\r\n\r\n        localFormattingTokens.lastIndex = 0;\r\n        while (i >= 0 && localFormattingTokens.test(format)) {\r\n            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\r\n            localFormattingTokens.lastIndex = 0;\r\n            i -= 1;\r\n        }\r\n\r\n        return format;\r\n    }\r\n\r\n    var match1         = /\\d/;            //       0 - 9\r\n    var match2         = /\\d\\d/;          //      00 - 99\r\n    var match3         = /\\d{3}/;         //     000 - 999\r\n    var match4         = /\\d{4}/;         //    0000 - 9999\r\n    var match6         = /[+-]?\\d{6}/;    // -999999 - 999999\r\n    var match1to2      = /\\d\\d?/;         //       0 - 99\r\n    var match3to4      = /\\d\\d\\d\\d?/;     //     999 - 9999\r\n    var match5to6      = /\\d\\d\\d\\d\\d\\d?/; //   99999 - 999999\r\n    var match1to3      = /\\d{1,3}/;       //       0 - 999\r\n    var match1to4      = /\\d{1,4}/;       //       0 - 9999\r\n    var match1to6      = /[+-]?\\d{1,6}/;  // -999999 - 999999\r\n\r\n    var matchUnsigned  = /\\d+/;           //       0 - inf\r\n    var matchSigned    = /[+-]?\\d+/;      //    -inf - inf\r\n\r\n    var matchOffset    = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\r\n    var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\r\n\r\n    var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\r\n\r\n    // any word (or two) characters or numbers including two/three word month in arabic.\r\n    // includes scottish gaelic two word and hyphenated months\r\n    var matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\r\n\r\n\r\n    var regexes = {};\r\n\r\n    function addRegexToken (token, regex, strictRegex) {\r\n        regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\r\n            return (isStrict && strictRegex) ? strictRegex : regex;\r\n        };\r\n    }\r\n\r\n    function getParseRegexForToken (token, config) {\r\n        if (!hasOwnProp(regexes, token)) {\r\n            return new RegExp(unescapeFormat(token));\r\n        }\r\n\r\n        return regexes[token](config._strict, config._locale);\r\n    }\r\n\r\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\r\n    function unescapeFormat(s) {\r\n        return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\r\n            return p1 || p2 || p3 || p4;\r\n        }));\r\n    }\r\n\r\n    function regexEscape(s) {\r\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\r\n    }\r\n\r\n    var tokens = {};\r\n\r\n    function addParseToken (token, callback) {\r\n        var i, func = callback;\r\n        if (typeof token === 'string') {\r\n            token = [token];\r\n        }\r\n        if (typeof callback === 'number') {\r\n            func = function (input, array) {\r\n                array[callback] = toInt(input);\r\n            };\r\n        }\r\n        for (i = 0; i < token.length; i++) {\r\n            tokens[token[i]] = func;\r\n        }\r\n    }\r\n\r\n    function addWeekParseToken (token, callback) {\r\n        addParseToken(token, function (input, array, config, token) {\r\n            config._w = config._w || {};\r\n            callback(input, config._w, config, token);\r\n        });\r\n    }\r\n\r\n    function addTimeToArrayFromToken(token, input, config) {\r\n        if (input != null && hasOwnProp(tokens, token)) {\r\n            tokens[token](input, config._a, config, token);\r\n        }\r\n    }\r\n\r\n    var YEAR = 0;\r\n    var MONTH = 1;\r\n    var DATE = 2;\r\n    var HOUR = 3;\r\n    var MINUTE = 4;\r\n    var SECOND = 5;\r\n    var MILLISECOND = 6;\r\n    var WEEK = 7;\r\n    var WEEKDAY = 8;\r\n\r\n    var indexOf;\r\n\r\n    if (Array.prototype.indexOf) {\r\n        indexOf = Array.prototype.indexOf;\r\n    } else {\r\n        indexOf = function (o) {\r\n            // I know\r\n            var i;\r\n            for (i = 0; i < this.length; ++i) {\r\n                if (this[i] === o) {\r\n                    return i;\r\n                }\r\n            }\r\n            return -1;\r\n        };\r\n    }\r\n\r\n    function daysInMonth(year, month) {\r\n        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\r\n        return this.month() + 1;\r\n    });\r\n\r\n    addFormatToken('MMM', 0, 0, function (format) {\r\n        return this.localeData().monthsShort(this, format);\r\n    });\r\n\r\n    addFormatToken('MMMM', 0, 0, function (format) {\r\n        return this.localeData().months(this, format);\r\n    });\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('month', 'M');\r\n\r\n    // PRIORITY\r\n\r\n    addUnitPriority('month', 8);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('M',    match1to2);\r\n    addRegexToken('MM',   match1to2, match2);\r\n    addRegexToken('MMM',  function (isStrict, locale) {\r\n        return locale.monthsShortRegex(isStrict);\r\n    });\r\n    addRegexToken('MMMM', function (isStrict, locale) {\r\n        return locale.monthsRegex(isStrict);\r\n    });\r\n\r\n    addParseToken(['M', 'MM'], function (input, array) {\r\n        array[MONTH] = toInt(input) - 1;\r\n    });\r\n\r\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\r\n        var month = config._locale.monthsParse(input, token, config._strict);\r\n        // if we didn't find a month name, mark the date as invalid.\r\n        if (month != null) {\r\n            array[MONTH] = month;\r\n        } else {\r\n            getParsingFlags(config).invalidMonth = input;\r\n        }\r\n    });\r\n\r\n    // LOCALES\r\n\r\n    var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s+)+MMMM?/;\r\n    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\r\n    function localeMonths (m, format) {\r\n        return isArray(this._months) ? this._months[m.month()] :\r\n            this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\r\n    }\r\n\r\n    var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\r\n    function localeMonthsShort (m, format) {\r\n        return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\r\n            this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\r\n    }\r\n\r\n    function units_month__handleStrictParse(monthName, format, strict) {\r\n        var i, ii, mom, llc = monthName.toLocaleLowerCase();\r\n        if (!this._monthsParse) {\r\n            // this is not used\r\n            this._monthsParse = [];\r\n            this._longMonthsParse = [];\r\n            this._shortMonthsParse = [];\r\n            for (i = 0; i < 12; ++i) {\r\n                mom = create_utc__createUTC([2000, i]);\r\n                this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\r\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\r\n            }\r\n        }\r\n\r\n        if (strict) {\r\n            if (format === 'MMM') {\r\n                ii = indexOf.call(this._shortMonthsParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            } else {\r\n                ii = indexOf.call(this._longMonthsParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            }\r\n        } else {\r\n            if (format === 'MMM') {\r\n                ii = indexOf.call(this._shortMonthsParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._longMonthsParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            } else {\r\n                ii = indexOf.call(this._longMonthsParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._shortMonthsParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            }\r\n        }\r\n    }\r\n\r\n    function localeMonthsParse (monthName, format, strict) {\r\n        var i, mom, regex;\r\n\r\n        if (this._monthsParseExact) {\r\n            return units_month__handleStrictParse.call(this, monthName, format, strict);\r\n        }\r\n\r\n        if (!this._monthsParse) {\r\n            this._monthsParse = [];\r\n            this._longMonthsParse = [];\r\n            this._shortMonthsParse = [];\r\n        }\r\n\r\n        // TODO: add sorting\r\n        // Sorting makes sure if one month (or abbr) is a prefix of another\r\n        // see sorting in computeMonthsParse\r\n        for (i = 0; i < 12; i++) {\r\n            // make the regex if we don't have it already\r\n            mom = create_utc__createUTC([2000, i]);\r\n            if (strict && !this._longMonthsParse[i]) {\r\n                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\r\n                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\r\n            }\r\n            if (!strict && !this._monthsParse[i]) {\r\n                regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\r\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\r\n            }\r\n            // test the regex\r\n            if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\r\n                return i;\r\n            } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\r\n                return i;\r\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\r\n                return i;\r\n            }\r\n        }\r\n    }\r\n\r\n    // MOMENTS\r\n\r\n    function setMonth (mom, value) {\r\n        var dayOfMonth;\r\n\r\n        if (!mom.isValid()) {\r\n            // No op\r\n            return mom;\r\n        }\r\n\r\n        if (typeof value === 'string') {\r\n            if (/^\\d+$/.test(value)) {\r\n                value = toInt(value);\r\n            } else {\r\n                value = mom.localeData().monthsParse(value);\r\n                // TODO: Another silent failure?\r\n                if (typeof value !== 'number') {\r\n                    return mom;\r\n                }\r\n            }\r\n        }\r\n\r\n        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\r\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\r\n        return mom;\r\n    }\r\n\r\n    function getSetMonth (value) {\r\n        if (value != null) {\r\n            setMonth(this, value);\r\n            utils_hooks__hooks.updateOffset(this, true);\r\n            return this;\r\n        } else {\r\n            return get_set__get(this, 'Month');\r\n        }\r\n    }\r\n\r\n    function getDaysInMonth () {\r\n        return daysInMonth(this.year(), this.month());\r\n    }\r\n\r\n    var defaultMonthsShortRegex = matchWord;\r\n    function monthsShortRegex (isStrict) {\r\n        if (this._monthsParseExact) {\r\n            if (!hasOwnProp(this, '_monthsRegex')) {\r\n                computeMonthsParse.call(this);\r\n            }\r\n            if (isStrict) {\r\n                return this._monthsShortStrictRegex;\r\n            } else {\r\n                return this._monthsShortRegex;\r\n            }\r\n        } else {\r\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\r\n                this._monthsShortRegex = defaultMonthsShortRegex;\r\n            }\r\n            return this._monthsShortStrictRegex && isStrict ?\r\n                this._monthsShortStrictRegex : this._monthsShortRegex;\r\n        }\r\n    }\r\n\r\n    var defaultMonthsRegex = matchWord;\r\n    function monthsRegex (isStrict) {\r\n        if (this._monthsParseExact) {\r\n            if (!hasOwnProp(this, '_monthsRegex')) {\r\n                computeMonthsParse.call(this);\r\n            }\r\n            if (isStrict) {\r\n                return this._monthsStrictRegex;\r\n            } else {\r\n                return this._monthsRegex;\r\n            }\r\n        } else {\r\n            if (!hasOwnProp(this, '_monthsRegex')) {\r\n                this._monthsRegex = defaultMonthsRegex;\r\n            }\r\n            return this._monthsStrictRegex && isStrict ?\r\n                this._monthsStrictRegex : this._monthsRegex;\r\n        }\r\n    }\r\n\r\n    function computeMonthsParse () {\r\n        function cmpLenRev(a, b) {\r\n            return b.length - a.length;\r\n        }\r\n\r\n        var shortPieces = [], longPieces = [], mixedPieces = [],\r\n            i, mom;\r\n        for (i = 0; i < 12; i++) {\r\n            // make the regex if we don't have it already\r\n            mom = create_utc__createUTC([2000, i]);\r\n            shortPieces.push(this.monthsShort(mom, ''));\r\n            longPieces.push(this.months(mom, ''));\r\n            mixedPieces.push(this.months(mom, ''));\r\n            mixedPieces.push(this.monthsShort(mom, ''));\r\n        }\r\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\r\n        // will match the longer piece.\r\n        shortPieces.sort(cmpLenRev);\r\n        longPieces.sort(cmpLenRev);\r\n        mixedPieces.sort(cmpLenRev);\r\n        for (i = 0; i < 12; i++) {\r\n            shortPieces[i] = regexEscape(shortPieces[i]);\r\n            longPieces[i] = regexEscape(longPieces[i]);\r\n        }\r\n        for (i = 0; i < 24; i++) {\r\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\r\n        }\r\n\r\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\r\n        this._monthsShortRegex = this._monthsRegex;\r\n        this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\r\n        this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('Y', 0, 0, function () {\r\n        var y = this.year();\r\n        return y <= 9999 ? '' + y : '+' + y;\r\n    });\r\n\r\n    addFormatToken(0, ['YY', 2], 0, function () {\r\n        return this.year() % 100;\r\n    });\r\n\r\n    addFormatToken(0, ['YYYY',   4],       0, 'year');\r\n    addFormatToken(0, ['YYYYY',  5],       0, 'year');\r\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('year', 'y');\r\n\r\n    // PRIORITIES\r\n\r\n    addUnitPriority('year', 1);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('Y',      matchSigned);\r\n    addRegexToken('YY',     match1to2, match2);\r\n    addRegexToken('YYYY',   match1to4, match4);\r\n    addRegexToken('YYYYY',  match1to6, match6);\r\n    addRegexToken('YYYYYY', match1to6, match6);\r\n\r\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\r\n    addParseToken('YYYY', function (input, array) {\r\n        array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);\r\n    });\r\n    addParseToken('YY', function (input, array) {\r\n        array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);\r\n    });\r\n    addParseToken('Y', function (input, array) {\r\n        array[YEAR] = parseInt(input, 10);\r\n    });\r\n\r\n    // HELPERS\r\n\r\n    function daysInYear(year) {\r\n        return isLeapYear(year) ? 366 : 365;\r\n    }\r\n\r\n    function isLeapYear(year) {\r\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n    }\r\n\r\n    // HOOKS\r\n\r\n    utils_hooks__hooks.parseTwoDigitYear = function (input) {\r\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\r\n    };\r\n\r\n    // MOMENTS\r\n\r\n    var getSetYear = makeGetSet('FullYear', true);\r\n\r\n    function getIsLeapYear () {\r\n        return isLeapYear(this.year());\r\n    }\r\n\r\n    function createDate (y, m, d, h, M, s, ms) {\r\n        //can't just apply() to create a date:\r\n        //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\r\n        var date = new Date(y, m, d, h, M, s, ms);\r\n\r\n        //the date constructor remaps years 0-99 to 1900-1999\r\n        if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\r\n            date.setFullYear(y);\r\n        }\r\n        return date;\r\n    }\r\n\r\n    function createUTCDate (y) {\r\n        var date = new Date(Date.UTC.apply(null, arguments));\r\n\r\n        //the Date.UTC function remaps years 0-99 to 1900-1999\r\n        if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\r\n            date.setUTCFullYear(y);\r\n        }\r\n        return date;\r\n    }\r\n\r\n    // start-of-first-week - start-of-year\r\n    function firstWeekOffset(year, dow, doy) {\r\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\r\n            fwd = 7 + dow - doy,\r\n            // first-week day local weekday -- which local weekday is fwd\r\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\r\n\r\n        return -fwdlw + fwd - 1;\r\n    }\r\n\r\n    //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\r\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\r\n        var localWeekday = (7 + weekday - dow) % 7,\r\n            weekOffset = firstWeekOffset(year, dow, doy),\r\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\r\n            resYear, resDayOfYear;\r\n\r\n        if (dayOfYear <= 0) {\r\n            resYear = year - 1;\r\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\r\n        } else if (dayOfYear > daysInYear(year)) {\r\n            resYear = year + 1;\r\n            resDayOfYear = dayOfYear - daysInYear(year);\r\n        } else {\r\n            resYear = year;\r\n            resDayOfYear = dayOfYear;\r\n        }\r\n\r\n        return {\r\n            year: resYear,\r\n            dayOfYear: resDayOfYear\r\n        };\r\n    }\r\n\r\n    function weekOfYear(mom, dow, doy) {\r\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\r\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\r\n            resWeek, resYear;\r\n\r\n        if (week < 1) {\r\n            resYear = mom.year() - 1;\r\n            resWeek = week + weeksInYear(resYear, dow, doy);\r\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\r\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\r\n            resYear = mom.year() + 1;\r\n        } else {\r\n            resYear = mom.year();\r\n            resWeek = week;\r\n        }\r\n\r\n        return {\r\n            week: resWeek,\r\n            year: resYear\r\n        };\r\n    }\r\n\r\n    function weeksInYear(year, dow, doy) {\r\n        var weekOffset = firstWeekOffset(year, dow, doy),\r\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\r\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\r\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('week', 'w');\r\n    addUnitAlias('isoWeek', 'W');\r\n\r\n    // PRIORITIES\r\n\r\n    addUnitPriority('week', 5);\r\n    addUnitPriority('isoWeek', 5);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('w',  match1to2);\r\n    addRegexToken('ww', match1to2, match2);\r\n    addRegexToken('W',  match1to2);\r\n    addRegexToken('WW', match1to2, match2);\r\n\r\n    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\r\n        week[token.substr(0, 1)] = toInt(input);\r\n    });\r\n\r\n    // HELPERS\r\n\r\n    // LOCALES\r\n\r\n    function localeWeek (mom) {\r\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\r\n    }\r\n\r\n    var defaultLocaleWeek = {\r\n        dow : 0, // Sunday is the first day of the week.\r\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\r\n    };\r\n\r\n    function localeFirstDayOfWeek () {\r\n        return this._week.dow;\r\n    }\r\n\r\n    function localeFirstDayOfYear () {\r\n        return this._week.doy;\r\n    }\r\n\r\n    // MOMENTS\r\n\r\n    function getSetWeek (input) {\r\n        var week = this.localeData().week(this);\r\n        return input == null ? week : this.add((input - week) * 7, 'd');\r\n    }\r\n\r\n    function getSetISOWeek (input) {\r\n        var week = weekOfYear(this, 1, 4).week;\r\n        return input == null ? week : this.add((input - week) * 7, 'd');\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('d', 0, 'do', 'day');\r\n\r\n    addFormatToken('dd', 0, 0, function (format) {\r\n        return this.localeData().weekdaysMin(this, format);\r\n    });\r\n\r\n    addFormatToken('ddd', 0, 0, function (format) {\r\n        return this.localeData().weekdaysShort(this, format);\r\n    });\r\n\r\n    addFormatToken('dddd', 0, 0, function (format) {\r\n        return this.localeData().weekdays(this, format);\r\n    });\r\n\r\n    addFormatToken('e', 0, 0, 'weekday');\r\n    addFormatToken('E', 0, 0, 'isoWeekday');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('day', 'd');\r\n    addUnitAlias('weekday', 'e');\r\n    addUnitAlias('isoWeekday', 'E');\r\n\r\n    // PRIORITY\r\n    addUnitPriority('day', 11);\r\n    addUnitPriority('weekday', 11);\r\n    addUnitPriority('isoWeekday', 11);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('d',    match1to2);\r\n    addRegexToken('e',    match1to2);\r\n    addRegexToken('E',    match1to2);\r\n    addRegexToken('dd',   function (isStrict, locale) {\r\n        return locale.weekdaysMinRegex(isStrict);\r\n    });\r\n    addRegexToken('ddd',   function (isStrict, locale) {\r\n        return locale.weekdaysShortRegex(isStrict);\r\n    });\r\n    addRegexToken('dddd',   function (isStrict, locale) {\r\n        return locale.weekdaysRegex(isStrict);\r\n    });\r\n\r\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\r\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\r\n        // if we didn't get a weekday name, mark the date as invalid\r\n        if (weekday != null) {\r\n            week.d = weekday;\r\n        } else {\r\n            getParsingFlags(config).invalidWeekday = input;\r\n        }\r\n    });\r\n\r\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\r\n        week[token] = toInt(input);\r\n    });\r\n\r\n    // HELPERS\r\n\r\n    function parseWeekday(input, locale) {\r\n        if (typeof input !== 'string') {\r\n            return input;\r\n        }\r\n\r\n        if (!isNaN(input)) {\r\n            return parseInt(input, 10);\r\n        }\r\n\r\n        input = locale.weekdaysParse(input);\r\n        if (typeof input === 'number') {\r\n            return input;\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    function parseIsoWeekday(input, locale) {\r\n        if (typeof input === 'string') {\r\n            return locale.weekdaysParse(input) % 7 || 7;\r\n        }\r\n        return isNaN(input) ? null : input;\r\n    }\r\n\r\n    // LOCALES\r\n\r\n    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\r\n    function localeWeekdays (m, format) {\r\n        return isArray(this._weekdays) ? this._weekdays[m.day()] :\r\n            this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\r\n    }\r\n\r\n    var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\r\n    function localeWeekdaysShort (m) {\r\n        return this._weekdaysShort[m.day()];\r\n    }\r\n\r\n    var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\r\n    function localeWeekdaysMin (m) {\r\n        return this._weekdaysMin[m.day()];\r\n    }\r\n\r\n    function day_of_week__handleStrictParse(weekdayName, format, strict) {\r\n        var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\r\n        if (!this._weekdaysParse) {\r\n            this._weekdaysParse = [];\r\n            this._shortWeekdaysParse = [];\r\n            this._minWeekdaysParse = [];\r\n\r\n            for (i = 0; i < 7; ++i) {\r\n                mom = create_utc__createUTC([2000, 1]).day(i);\r\n                this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\r\n                this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\r\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\r\n            }\r\n        }\r\n\r\n        if (strict) {\r\n            if (format === 'dddd') {\r\n                ii = indexOf.call(this._weekdaysParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            } else if (format === 'ddd') {\r\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            } else {\r\n                ii = indexOf.call(this._minWeekdaysParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            }\r\n        } else {\r\n            if (format === 'dddd') {\r\n                ii = indexOf.call(this._weekdaysParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._minWeekdaysParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            } else if (format === 'ddd') {\r\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._weekdaysParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._minWeekdaysParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            } else {\r\n                ii = indexOf.call(this._minWeekdaysParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._weekdaysParse, llc);\r\n                if (ii !== -1) {\r\n                    return ii;\r\n                }\r\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n                return ii !== -1 ? ii : null;\r\n            }\r\n        }\r\n    }\r\n\r\n    function localeWeekdaysParse (weekdayName, format, strict) {\r\n        var i, mom, regex;\r\n\r\n        if (this._weekdaysParseExact) {\r\n            return day_of_week__handleStrictParse.call(this, weekdayName, format, strict);\r\n        }\r\n\r\n        if (!this._weekdaysParse) {\r\n            this._weekdaysParse = [];\r\n            this._minWeekdaysParse = [];\r\n            this._shortWeekdaysParse = [];\r\n            this._fullWeekdaysParse = [];\r\n        }\r\n\r\n        for (i = 0; i < 7; i++) {\r\n            // make the regex if we don't have it already\r\n\r\n            mom = create_utc__createUTC([2000, 1]).day(i);\r\n            if (strict && !this._fullWeekdaysParse[i]) {\r\n                this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\r\n                this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\r\n                this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\r\n            }\r\n            if (!this._weekdaysParse[i]) {\r\n                regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\r\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\r\n            }\r\n            // test the regex\r\n            if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\r\n                return i;\r\n            } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\r\n                return i;\r\n            } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\r\n                return i;\r\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\r\n                return i;\r\n            }\r\n        }\r\n    }\r\n\r\n    // MOMENTS\r\n\r\n    function getSetDayOfWeek (input) {\r\n        if (!this.isValid()) {\r\n            return input != null ? this : NaN;\r\n        }\r\n        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\r\n        if (input != null) {\r\n            input = parseWeekday(input, this.localeData());\r\n            return this.add(input - day, 'd');\r\n        } else {\r\n            return day;\r\n        }\r\n    }\r\n\r\n    function getSetLocaleDayOfWeek (input) {\r\n        if (!this.isValid()) {\r\n            return input != null ? this : NaN;\r\n        }\r\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\r\n        return input == null ? weekday : this.add(input - weekday, 'd');\r\n    }\r\n\r\n    function getSetISODayOfWeek (input) {\r\n        if (!this.isValid()) {\r\n            return input != null ? this : NaN;\r\n        }\r\n\r\n        // behaves the same as moment#day except\r\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\r\n        // as a setter, sunday should belong to the previous week.\r\n\r\n        if (input != null) {\r\n            var weekday = parseIsoWeekday(input, this.localeData());\r\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\r\n        } else {\r\n            return this.day() || 7;\r\n        }\r\n    }\r\n\r\n    var defaultWeekdaysRegex = matchWord;\r\n    function weekdaysRegex (isStrict) {\r\n        if (this._weekdaysParseExact) {\r\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n                computeWeekdaysParse.call(this);\r\n            }\r\n            if (isStrict) {\r\n                return this._weekdaysStrictRegex;\r\n            } else {\r\n                return this._weekdaysRegex;\r\n            }\r\n        } else {\r\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n                this._weekdaysRegex = defaultWeekdaysRegex;\r\n            }\r\n            return this._weekdaysStrictRegex && isStrict ?\r\n                this._weekdaysStrictRegex : this._weekdaysRegex;\r\n        }\r\n    }\r\n\r\n    var defaultWeekdaysShortRegex = matchWord;\r\n    function weekdaysShortRegex (isStrict) {\r\n        if (this._weekdaysParseExact) {\r\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n                computeWeekdaysParse.call(this);\r\n            }\r\n            if (isStrict) {\r\n                return this._weekdaysShortStrictRegex;\r\n            } else {\r\n                return this._weekdaysShortRegex;\r\n            }\r\n        } else {\r\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\r\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\r\n            }\r\n            return this._weekdaysShortStrictRegex && isStrict ?\r\n                this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\r\n        }\r\n    }\r\n\r\n    var defaultWeekdaysMinRegex = matchWord;\r\n    function weekdaysMinRegex (isStrict) {\r\n        if (this._weekdaysParseExact) {\r\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n                computeWeekdaysParse.call(this);\r\n            }\r\n            if (isStrict) {\r\n                return this._weekdaysMinStrictRegex;\r\n            } else {\r\n                return this._weekdaysMinRegex;\r\n            }\r\n        } else {\r\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\r\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\r\n            }\r\n            return this._weekdaysMinStrictRegex && isStrict ?\r\n                this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\r\n        }\r\n    }\r\n\r\n\r\n    function computeWeekdaysParse () {\r\n        function cmpLenRev(a, b) {\r\n            return b.length - a.length;\r\n        }\r\n\r\n        var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\r\n            i, mom, minp, shortp, longp;\r\n        for (i = 0; i < 7; i++) {\r\n            // make the regex if we don't have it already\r\n            mom = create_utc__createUTC([2000, 1]).day(i);\r\n            minp = this.weekdaysMin(mom, '');\r\n            shortp = this.weekdaysShort(mom, '');\r\n            longp = this.weekdays(mom, '');\r\n            minPieces.push(minp);\r\n            shortPieces.push(shortp);\r\n            longPieces.push(longp);\r\n            mixedPieces.push(minp);\r\n            mixedPieces.push(shortp);\r\n            mixedPieces.push(longp);\r\n        }\r\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\r\n        // will match the longer piece.\r\n        minPieces.sort(cmpLenRev);\r\n        shortPieces.sort(cmpLenRev);\r\n        longPieces.sort(cmpLenRev);\r\n        mixedPieces.sort(cmpLenRev);\r\n        for (i = 0; i < 7; i++) {\r\n            shortPieces[i] = regexEscape(shortPieces[i]);\r\n            longPieces[i] = regexEscape(longPieces[i]);\r\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\r\n        }\r\n\r\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\r\n        this._weekdaysShortRegex = this._weekdaysRegex;\r\n        this._weekdaysMinRegex = this._weekdaysRegex;\r\n\r\n        this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\r\n        this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\r\n        this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    function hFormat() {\r\n        return this.hours() % 12 || 12;\r\n    }\r\n\r\n    function kFormat() {\r\n        return this.hours() || 24;\r\n    }\r\n\r\n    addFormatToken('H', ['HH', 2], 0, 'hour');\r\n    addFormatToken('h', ['hh', 2], 0, hFormat);\r\n    addFormatToken('k', ['kk', 2], 0, kFormat);\r\n\r\n    addFormatToken('hmm', 0, 0, function () {\r\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\r\n    });\r\n\r\n    addFormatToken('hmmss', 0, 0, function () {\r\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\r\n            zeroFill(this.seconds(), 2);\r\n    });\r\n\r\n    addFormatToken('Hmm', 0, 0, function () {\r\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\r\n    });\r\n\r\n    addFormatToken('Hmmss', 0, 0, function () {\r\n        return '' + this.hours() + zeroFill(this.minutes(), 2) +\r\n            zeroFill(this.seconds(), 2);\r\n    });\r\n\r\n    function meridiem (token, lowercase) {\r\n        addFormatToken(token, 0, 0, function () {\r\n            return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\r\n        });\r\n    }\r\n\r\n    meridiem('a', true);\r\n    meridiem('A', false);\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('hour', 'h');\r\n\r\n    // PRIORITY\r\n    addUnitPriority('hour', 13);\r\n\r\n    // PARSING\r\n\r\n    function matchMeridiem (isStrict, locale) {\r\n        return locale._meridiemParse;\r\n    }\r\n\r\n    addRegexToken('a',  matchMeridiem);\r\n    addRegexToken('A',  matchMeridiem);\r\n    addRegexToken('H',  match1to2);\r\n    addRegexToken('h',  match1to2);\r\n    addRegexToken('HH', match1to2, match2);\r\n    addRegexToken('hh', match1to2, match2);\r\n\r\n    addRegexToken('hmm', match3to4);\r\n    addRegexToken('hmmss', match5to6);\r\n    addRegexToken('Hmm', match3to4);\r\n    addRegexToken('Hmmss', match5to6);\r\n\r\n    addParseToken(['H', 'HH'], HOUR);\r\n    addParseToken(['a', 'A'], function (input, array, config) {\r\n        config._isPm = config._locale.isPM(input);\r\n        config._meridiem = input;\r\n    });\r\n    addParseToken(['h', 'hh'], function (input, array, config) {\r\n        array[HOUR] = toInt(input);\r\n        getParsingFlags(config).bigHour = true;\r\n    });\r\n    addParseToken('hmm', function (input, array, config) {\r\n        var pos = input.length - 2;\r\n        array[HOUR] = toInt(input.substr(0, pos));\r\n        array[MINUTE] = toInt(input.substr(pos));\r\n        getParsingFlags(config).bigHour = true;\r\n    });\r\n    addParseToken('hmmss', function (input, array, config) {\r\n        var pos1 = input.length - 4;\r\n        var pos2 = input.length - 2;\r\n        array[HOUR] = toInt(input.substr(0, pos1));\r\n        array[MINUTE] = toInt(input.substr(pos1, 2));\r\n        array[SECOND] = toInt(input.substr(pos2));\r\n        getParsingFlags(config).bigHour = true;\r\n    });\r\n    addParseToken('Hmm', function (input, array, config) {\r\n        var pos = input.length - 2;\r\n        array[HOUR] = toInt(input.substr(0, pos));\r\n        array[MINUTE] = toInt(input.substr(pos));\r\n    });\r\n    addParseToken('Hmmss', function (input, array, config) {\r\n        var pos1 = input.length - 4;\r\n        var pos2 = input.length - 2;\r\n        array[HOUR] = toInt(input.substr(0, pos1));\r\n        array[MINUTE] = toInt(input.substr(pos1, 2));\r\n        array[SECOND] = toInt(input.substr(pos2));\r\n    });\r\n\r\n    // LOCALES\r\n\r\n    function localeIsPM (input) {\r\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\r\n        // Using charAt should be more compatible.\r\n        return ((input + '').toLowerCase().charAt(0) === 'p');\r\n    }\r\n\r\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\r\n    function localeMeridiem (hours, minutes, isLower) {\r\n        if (hours > 11) {\r\n            return isLower ? 'pm' : 'PM';\r\n        } else {\r\n            return isLower ? 'am' : 'AM';\r\n        }\r\n    }\r\n\r\n\r\n    // MOMENTS\r\n\r\n    // Setting the hour should keep the time, because the user explicitly\r\n    // specified which hour he wants. So trying to maintain the same hour (in\r\n    // a new timezone) makes sense. Adding/subtracting hours does not follow\r\n    // this rule.\r\n    var getSetHour = makeGetSet('Hours', true);\r\n\r\n    var baseConfig = {\r\n        calendar: defaultCalendar,\r\n        longDateFormat: defaultLongDateFormat,\r\n        invalidDate: defaultInvalidDate,\r\n        ordinal: defaultOrdinal,\r\n        ordinalParse: defaultOrdinalParse,\r\n        relativeTime: defaultRelativeTime,\r\n\r\n        months: defaultLocaleMonths,\r\n        monthsShort: defaultLocaleMonthsShort,\r\n\r\n        week: defaultLocaleWeek,\r\n\r\n        weekdays: defaultLocaleWeekdays,\r\n        weekdaysMin: defaultLocaleWeekdaysMin,\r\n        weekdaysShort: defaultLocaleWeekdaysShort,\r\n\r\n        meridiemParse: defaultLocaleMeridiemParse\r\n    };\r\n\r\n    // internal storage for locale config files\r\n    var locales = {};\r\n    var globalLocale;\r\n\r\n    function normalizeLocale(key) {\r\n        return key ? key.toLowerCase().replace('_', '-') : key;\r\n    }\r\n\r\n    // pick the locale from the array\r\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\r\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\r\n    function chooseLocale(names) {\r\n        var i = 0, j, next, locale, split;\r\n\r\n        while (i < names.length) {\r\n            split = normalizeLocale(names[i]).split('-');\r\n            j = split.length;\r\n            next = normalizeLocale(names[i + 1]);\r\n            next = next ? next.split('-') : null;\r\n            while (j > 0) {\r\n                locale = loadLocale(split.slice(0, j).join('-'));\r\n                if (locale) {\r\n                    return locale;\r\n                }\r\n                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\r\n                    //the next array item is better than a shallower substring of this one\r\n                    break;\r\n                }\r\n                j--;\r\n            }\r\n            i++;\r\n        }\r\n        return null;\r\n    }\r\n\r\n    function loadLocale(name) {\r\n        var oldLocale = null;\r\n        // TODO: Find a better way to register and load all the locales in Node\r\n        if (!locales[name] && (typeof module !== 'undefined') &&\r\n                module && module.exports) {\r\n            try {\r\n                oldLocale = globalLocale._abbr;\r\n                require('./locale/' + name);\r\n                // because defineLocale currently also sets the global locale, we\r\n                // want to undo that for lazy loaded locales\r\n                locale_locales__getSetGlobalLocale(oldLocale);\r\n            } catch (e) { }\r\n        }\r\n        return locales[name];\r\n    }\r\n\r\n    // This function will load locale and then set the global locale.  If\r\n    // no arguments are passed in, it will simply return the current global\r\n    // locale key.\r\n    function locale_locales__getSetGlobalLocale (key, values) {\r\n        var data;\r\n        if (key) {\r\n            if (isUndefined(values)) {\r\n                data = locale_locales__getLocale(key);\r\n            }\r\n            else {\r\n                data = defineLocale(key, values);\r\n            }\r\n\r\n            if (data) {\r\n                // moment.duration._locale = moment._locale = data;\r\n                globalLocale = data;\r\n            }\r\n        }\r\n\r\n        return globalLocale._abbr;\r\n    }\r\n\r\n    function defineLocale (name, config) {\r\n        if (config !== null) {\r\n            var parentConfig = baseConfig;\r\n            config.abbr = name;\r\n            if (locales[name] != null) {\r\n                deprecateSimple('defineLocaleOverride',\r\n                        'use moment.updateLocale(localeName, config) to change ' +\r\n                        'an existing locale. moment.defineLocale(localeName, ' +\r\n                        'config) should only be used for creating a new locale ' +\r\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\r\n                parentConfig = locales[name]._config;\r\n            } else if (config.parentLocale != null) {\r\n                if (locales[config.parentLocale] != null) {\r\n                    parentConfig = locales[config.parentLocale]._config;\r\n                } else {\r\n                    // treat as if there is no base config\r\n                    deprecateSimple('parentLocaleUndefined',\r\n                            'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/');\r\n                }\r\n            }\r\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\r\n\r\n            // backwards compat for now: also set the locale\r\n            locale_locales__getSetGlobalLocale(name);\r\n\r\n            return locales[name];\r\n        } else {\r\n            // useful for testing\r\n            delete locales[name];\r\n            return null;\r\n        }\r\n    }\r\n\r\n    function updateLocale(name, config) {\r\n        if (config != null) {\r\n            var locale, parentConfig = baseConfig;\r\n            // MERGE\r\n            if (locales[name] != null) {\r\n                parentConfig = locales[name]._config;\r\n            }\r\n            config = mergeConfigs(parentConfig, config);\r\n            locale = new Locale(config);\r\n            locale.parentLocale = locales[name];\r\n            locales[name] = locale;\r\n\r\n            // backwards compat for now: also set the locale\r\n            locale_locales__getSetGlobalLocale(name);\r\n        } else {\r\n            // pass null for config to unupdate, useful for tests\r\n            if (locales[name] != null) {\r\n                if (locales[name].parentLocale != null) {\r\n                    locales[name] = locales[name].parentLocale;\r\n                } else if (locales[name] != null) {\r\n                    delete locales[name];\r\n                }\r\n            }\r\n        }\r\n        return locales[name];\r\n    }\r\n\r\n    // returns locale data\r\n    function locale_locales__getLocale (key) {\r\n        var locale;\r\n\r\n        if (key && key._locale && key._locale._abbr) {\r\n            key = key._locale._abbr;\r\n        }\r\n\r\n        if (!key) {\r\n            return globalLocale;\r\n        }\r\n\r\n        if (!isArray(key)) {\r\n            //short-circuit everything else\r\n            locale = loadLocale(key);\r\n            if (locale) {\r\n                return locale;\r\n            }\r\n            key = [key];\r\n        }\r\n\r\n        return chooseLocale(key);\r\n    }\r\n\r\n    function locale_locales__listLocales() {\r\n        return keys(locales);\r\n    }\r\n\r\n    function checkOverflow (m) {\r\n        var overflow;\r\n        var a = m._a;\r\n\r\n        if (a && getParsingFlags(m).overflow === -2) {\r\n            overflow =\r\n                a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :\r\n                a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\r\n                a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\r\n                a[MINUTE]      < 0 || a[MINUTE]      > 59  ? MINUTE :\r\n                a[SECOND]      < 0 || a[SECOND]      > 59  ? SECOND :\r\n                a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\r\n                -1;\r\n\r\n            if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\r\n                overflow = DATE;\r\n            }\r\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\r\n                overflow = WEEK;\r\n            }\r\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\r\n                overflow = WEEKDAY;\r\n            }\r\n\r\n            getParsingFlags(m).overflow = overflow;\r\n        }\r\n\r\n        return m;\r\n    }\r\n\r\n    // iso 8601 regex\r\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\r\n    var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\r\n    var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\r\n\r\n    var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\r\n\r\n    var isoDates = [\r\n        ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\r\n        ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\r\n        ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\r\n        ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\r\n        ['YYYY-DDD', /\\d{4}-\\d{3}/],\r\n        ['YYYY-MM', /\\d{4}-\\d\\d/, false],\r\n        ['YYYYYYMMDD', /[+-]\\d{10}/],\r\n        ['YYYYMMDD', /\\d{8}/],\r\n        // YYYYMM is NOT allowed by the standard\r\n        ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\r\n        ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\r\n        ['YYYYDDD', /\\d{7}/]\r\n    ];\r\n\r\n    // iso time formats and regexes\r\n    var isoTimes = [\r\n        ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\r\n        ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\r\n        ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\r\n        ['HH:mm', /\\d\\d:\\d\\d/],\r\n        ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\r\n        ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\r\n        ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\r\n        ['HHmm', /\\d\\d\\d\\d/],\r\n        ['HH', /\\d\\d/]\r\n    ];\r\n\r\n    var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\r\n\r\n    // date from iso format\r\n    function configFromISO(config) {\r\n        var i, l,\r\n            string = config._i,\r\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\r\n            allowTime, dateFormat, timeFormat, tzFormat;\r\n\r\n        if (match) {\r\n            getParsingFlags(config).iso = true;\r\n\r\n            for (i = 0, l = isoDates.length; i < l; i++) {\r\n                if (isoDates[i][1].exec(match[1])) {\r\n                    dateFormat = isoDates[i][0];\r\n                    allowTime = isoDates[i][2] !== false;\r\n                    break;\r\n                }\r\n            }\r\n            if (dateFormat == null) {\r\n                config._isValid = false;\r\n                return;\r\n            }\r\n            if (match[3]) {\r\n                for (i = 0, l = isoTimes.length; i < l; i++) {\r\n                    if (isoTimes[i][1].exec(match[3])) {\r\n                        // match[2] should be 'T' or space\r\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\r\n                        break;\r\n                    }\r\n                }\r\n                if (timeFormat == null) {\r\n                    config._isValid = false;\r\n                    return;\r\n                }\r\n            }\r\n            if (!allowTime && timeFormat != null) {\r\n                config._isValid = false;\r\n                return;\r\n            }\r\n            if (match[4]) {\r\n                if (tzRegex.exec(match[4])) {\r\n                    tzFormat = 'Z';\r\n                } else {\r\n                    config._isValid = false;\r\n                    return;\r\n                }\r\n            }\r\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\r\n            configFromStringAndFormat(config);\r\n        } else {\r\n            config._isValid = false;\r\n        }\r\n    }\r\n\r\n    // date from iso format or fallback\r\n    function configFromString(config) {\r\n        var matched = aspNetJsonRegex.exec(config._i);\r\n\r\n        if (matched !== null) {\r\n            config._d = new Date(+matched[1]);\r\n            return;\r\n        }\r\n\r\n        configFromISO(config);\r\n        if (config._isValid === false) {\r\n            delete config._isValid;\r\n            utils_hooks__hooks.createFromInputFallback(config);\r\n        }\r\n    }\r\n\r\n    utils_hooks__hooks.createFromInputFallback = deprecate(\r\n        'moment construction falls back to js Date. This is ' +\r\n        'discouraged and will be removed in upcoming major ' +\r\n        'release. Please refer to ' +\r\n        'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\r\n        function (config) {\r\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\r\n        }\r\n    );\r\n\r\n    // Pick the first defined of two or three arguments.\r\n    function defaults(a, b, c) {\r\n        if (a != null) {\r\n            return a;\r\n        }\r\n        if (b != null) {\r\n            return b;\r\n        }\r\n        return c;\r\n    }\r\n\r\n    function currentDateArray(config) {\r\n        // hooks is actually the exported moment object\r\n        var nowValue = new Date(utils_hooks__hooks.now());\r\n        if (config._useUTC) {\r\n            return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\r\n        }\r\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\r\n    }\r\n\r\n    // convert an array to a date.\r\n    // the array should mirror the parameters below\r\n    // note: all values past the year are optional and will default to the lowest possible value.\r\n    // [year, month, day , hour, minute, second, millisecond]\r\n    function configFromArray (config) {\r\n        var i, date, input = [], currentDate, yearToUse;\r\n\r\n        if (config._d) {\r\n            return;\r\n        }\r\n\r\n        currentDate = currentDateArray(config);\r\n\r\n        //compute day of the year from weeks and weekdays\r\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\r\n            dayOfYearFromWeekInfo(config);\r\n        }\r\n\r\n        //if the day of the year is set, figure out what it is\r\n        if (config._dayOfYear) {\r\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\r\n\r\n            if (config._dayOfYear > daysInYear(yearToUse)) {\r\n                getParsingFlags(config)._overflowDayOfYear = true;\r\n            }\r\n\r\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\r\n            config._a[MONTH] = date.getUTCMonth();\r\n            config._a[DATE] = date.getUTCDate();\r\n        }\r\n\r\n        // Default to current date.\r\n        // * if no year, month, day of month are given, default to today\r\n        // * if day of month is given, default month and year\r\n        // * if month is given, default only year\r\n        // * if year is given, don't default anything\r\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\r\n            config._a[i] = input[i] = currentDate[i];\r\n        }\r\n\r\n        // Zero out whatever was not defaulted, including time\r\n        for (; i < 7; i++) {\r\n            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\r\n        }\r\n\r\n        // Check for 24:00:00.000\r\n        if (config._a[HOUR] === 24 &&\r\n                config._a[MINUTE] === 0 &&\r\n                config._a[SECOND] === 0 &&\r\n                config._a[MILLISECOND] === 0) {\r\n            config._nextDay = true;\r\n            config._a[HOUR] = 0;\r\n        }\r\n\r\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\r\n        // Apply timezone offset from input. The actual utcOffset can be changed\r\n        // with parseZone.\r\n        if (config._tzm != null) {\r\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\r\n        }\r\n\r\n        if (config._nextDay) {\r\n            config._a[HOUR] = 24;\r\n        }\r\n    }\r\n\r\n    function dayOfYearFromWeekInfo(config) {\r\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\r\n\r\n        w = config._w;\r\n        if (w.GG != null || w.W != null || w.E != null) {\r\n            dow = 1;\r\n            doy = 4;\r\n\r\n            // TODO: We need to take the current isoWeekYear, but that depends on\r\n            // how we interpret now (local, utc, fixed offset). So create\r\n            // a now version of current config (take local/utc/offset flags, and\r\n            // create now).\r\n            weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);\r\n            week = defaults(w.W, 1);\r\n            weekday = defaults(w.E, 1);\r\n            if (weekday < 1 || weekday > 7) {\r\n                weekdayOverflow = true;\r\n            }\r\n        } else {\r\n            dow = config._locale._week.dow;\r\n            doy = config._locale._week.doy;\r\n\r\n            weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);\r\n            week = defaults(w.w, 1);\r\n\r\n            if (w.d != null) {\r\n                // weekday -- low day numbers are considered next week\r\n                weekday = w.d;\r\n                if (weekday < 0 || weekday > 6) {\r\n                    weekdayOverflow = true;\r\n                }\r\n            } else if (w.e != null) {\r\n                // local weekday -- counting starts from begining of week\r\n                weekday = w.e + dow;\r\n                if (w.e < 0 || w.e > 6) {\r\n                    weekdayOverflow = true;\r\n                }\r\n            } else {\r\n                // default to begining of week\r\n                weekday = dow;\r\n            }\r\n        }\r\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\r\n            getParsingFlags(config)._overflowWeeks = true;\r\n        } else if (weekdayOverflow != null) {\r\n            getParsingFlags(config)._overflowWeekday = true;\r\n        } else {\r\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\r\n            config._a[YEAR] = temp.year;\r\n            config._dayOfYear = temp.dayOfYear;\r\n        }\r\n    }\r\n\r\n    // constant that refers to the ISO standard\r\n    utils_hooks__hooks.ISO_8601 = function () {};\r\n\r\n    // date from string and format string\r\n    function configFromStringAndFormat(config) {\r\n        // TODO: Move this to another part of the creation flow to prevent circular deps\r\n        if (config._f === utils_hooks__hooks.ISO_8601) {\r\n            configFromISO(config);\r\n            return;\r\n        }\r\n\r\n        config._a = [];\r\n        getParsingFlags(config).empty = true;\r\n\r\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\r\n        var string = '' + config._i,\r\n            i, parsedInput, tokens, token, skipped,\r\n            stringLength = string.length,\r\n            totalParsedInputLength = 0;\r\n\r\n        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\r\n\r\n        for (i = 0; i < tokens.length; i++) {\r\n            token = tokens[i];\r\n            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\r\n            // console.log('token', token, 'parsedInput', parsedInput,\r\n            //         'regex', getParseRegexForToken(token, config));\r\n            if (parsedInput) {\r\n                skipped = string.substr(0, string.indexOf(parsedInput));\r\n                if (skipped.length > 0) {\r\n                    getParsingFlags(config).unusedInput.push(skipped);\r\n                }\r\n                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\r\n                totalParsedInputLength += parsedInput.length;\r\n            }\r\n            // don't parse if it's not a known token\r\n            if (formatTokenFunctions[token]) {\r\n                if (parsedInput) {\r\n                    getParsingFlags(config).empty = false;\r\n                }\r\n                else {\r\n                    getParsingFlags(config).unusedTokens.push(token);\r\n                }\r\n                addTimeToArrayFromToken(token, parsedInput, config);\r\n            }\r\n            else if (config._strict && !parsedInput) {\r\n                getParsingFlags(config).unusedTokens.push(token);\r\n            }\r\n        }\r\n\r\n        // add remaining unparsed input length to the string\r\n        getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\r\n        if (string.length > 0) {\r\n            getParsingFlags(config).unusedInput.push(string);\r\n        }\r\n\r\n        // clear _12h flag if hour is <= 12\r\n        if (config._a[HOUR] <= 12 &&\r\n            getParsingFlags(config).bigHour === true &&\r\n            config._a[HOUR] > 0) {\r\n            getParsingFlags(config).bigHour = undefined;\r\n        }\r\n\r\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\r\n        getParsingFlags(config).meridiem = config._meridiem;\r\n        // handle meridiem\r\n        config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\r\n\r\n        configFromArray(config);\r\n        checkOverflow(config);\r\n    }\r\n\r\n\r\n    function meridiemFixWrap (locale, hour, meridiem) {\r\n        var isPm;\r\n\r\n        if (meridiem == null) {\r\n            // nothing to do\r\n            return hour;\r\n        }\r\n        if (locale.meridiemHour != null) {\r\n            return locale.meridiemHour(hour, meridiem);\r\n        } else if (locale.isPM != null) {\r\n            // Fallback\r\n            isPm = locale.isPM(meridiem);\r\n            if (isPm && hour < 12) {\r\n                hour += 12;\r\n            }\r\n            if (!isPm && hour === 12) {\r\n                hour = 0;\r\n            }\r\n            return hour;\r\n        } else {\r\n            // this is not supposed to happen\r\n            return hour;\r\n        }\r\n    }\r\n\r\n    // date from string and array of format strings\r\n    function configFromStringAndArray(config) {\r\n        var tempConfig,\r\n            bestMoment,\r\n\r\n            scoreToBeat,\r\n            i,\r\n            currentScore;\r\n\r\n        if (config._f.length === 0) {\r\n            getParsingFlags(config).invalidFormat = true;\r\n            config._d = new Date(NaN);\r\n            return;\r\n        }\r\n\r\n        for (i = 0; i < config._f.length; i++) {\r\n            currentScore = 0;\r\n            tempConfig = copyConfig({}, config);\r\n            if (config._useUTC != null) {\r\n                tempConfig._useUTC = config._useUTC;\r\n            }\r\n            tempConfig._f = config._f[i];\r\n            configFromStringAndFormat(tempConfig);\r\n\r\n            if (!valid__isValid(tempConfig)) {\r\n                continue;\r\n            }\r\n\r\n            // if there is any input that was not parsed add a penalty for that format\r\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\r\n\r\n            //or tokens\r\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\r\n\r\n            getParsingFlags(tempConfig).score = currentScore;\r\n\r\n            if (scoreToBeat == null || currentScore < scoreToBeat) {\r\n                scoreToBeat = currentScore;\r\n                bestMoment = tempConfig;\r\n            }\r\n        }\r\n\r\n        extend(config, bestMoment || tempConfig);\r\n    }\r\n\r\n    function configFromObject(config) {\r\n        if (config._d) {\r\n            return;\r\n        }\r\n\r\n        var i = normalizeObjectUnits(config._i);\r\n        config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\r\n            return obj && parseInt(obj, 10);\r\n        });\r\n\r\n        configFromArray(config);\r\n    }\r\n\r\n    function createFromConfig (config) {\r\n        var res = new Moment(checkOverflow(prepareConfig(config)));\r\n        if (res._nextDay) {\r\n            // Adding is smart enough around DST\r\n            res.add(1, 'd');\r\n            res._nextDay = undefined;\r\n        }\r\n\r\n        return res;\r\n    }\r\n\r\n    function prepareConfig (config) {\r\n        var input = config._i,\r\n            format = config._f;\r\n\r\n        config._locale = config._locale || locale_locales__getLocale(config._l);\r\n\r\n        if (input === null || (format === undefined && input === '')) {\r\n            return valid__createInvalid({nullInput: true});\r\n        }\r\n\r\n        if (typeof input === 'string') {\r\n            config._i = input = config._locale.preparse(input);\r\n        }\r\n\r\n        if (isMoment(input)) {\r\n            return new Moment(checkOverflow(input));\r\n        } else if (isArray(format)) {\r\n            configFromStringAndArray(config);\r\n        } else if (isDate(input)) {\r\n            config._d = input;\r\n        } else if (format) {\r\n            configFromStringAndFormat(config);\r\n        }  else {\r\n            configFromInput(config);\r\n        }\r\n\r\n        if (!valid__isValid(config)) {\r\n            config._d = null;\r\n        }\r\n\r\n        return config;\r\n    }\r\n\r\n    function configFromInput(config) {\r\n        var input = config._i;\r\n        if (input === undefined) {\r\n            config._d = new Date(utils_hooks__hooks.now());\r\n        } else if (isDate(input)) {\r\n            config._d = new Date(input.valueOf());\r\n        } else if (typeof input === 'string') {\r\n            configFromString(config);\r\n        } else if (isArray(input)) {\r\n            config._a = map(input.slice(0), function (obj) {\r\n                return parseInt(obj, 10);\r\n            });\r\n            configFromArray(config);\r\n        } else if (typeof(input) === 'object') {\r\n            configFromObject(config);\r\n        } else if (typeof(input) === 'number') {\r\n            // from milliseconds\r\n            config._d = new Date(input);\r\n        } else {\r\n            utils_hooks__hooks.createFromInputFallback(config);\r\n        }\r\n    }\r\n\r\n    function createLocalOrUTC (input, format, locale, strict, isUTC) {\r\n        var c = {};\r\n\r\n        if (typeof(locale) === 'boolean') {\r\n            strict = locale;\r\n            locale = undefined;\r\n        }\r\n\r\n        if ((isObject(input) && isObjectEmpty(input)) ||\r\n                (isArray(input) && input.length === 0)) {\r\n            input = undefined;\r\n        }\r\n        // object construction must be done this way.\r\n        // https://github.com/moment/moment/issues/1423\r\n        c._isAMomentObject = true;\r\n        c._useUTC = c._isUTC = isUTC;\r\n        c._l = locale;\r\n        c._i = input;\r\n        c._f = format;\r\n        c._strict = strict;\r\n\r\n        return createFromConfig(c);\r\n    }\r\n\r\n    function local__createLocal (input, format, locale, strict) {\r\n        return createLocalOrUTC(input, format, locale, strict, false);\r\n    }\r\n\r\n    var prototypeMin = deprecate(\r\n        'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\r\n        function () {\r\n            var other = local__createLocal.apply(null, arguments);\r\n            if (this.isValid() && other.isValid()) {\r\n                return other < this ? this : other;\r\n            } else {\r\n                return valid__createInvalid();\r\n            }\r\n        }\r\n    );\r\n\r\n    var prototypeMax = deprecate(\r\n        'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\r\n        function () {\r\n            var other = local__createLocal.apply(null, arguments);\r\n            if (this.isValid() && other.isValid()) {\r\n                return other > this ? this : other;\r\n            } else {\r\n                return valid__createInvalid();\r\n            }\r\n        }\r\n    );\r\n\r\n    // Pick a moment m from moments so that m[fn](other) is true for all\r\n    // other. This relies on the function fn to be transitive.\r\n    //\r\n    // moments should either be an array of moment objects or an array, whose\r\n    // first element is an array of moment objects.\r\n    function pickBy(fn, moments) {\r\n        var res, i;\r\n        if (moments.length === 1 && isArray(moments[0])) {\r\n            moments = moments[0];\r\n        }\r\n        if (!moments.length) {\r\n            return local__createLocal();\r\n        }\r\n        res = moments[0];\r\n        for (i = 1; i < moments.length; ++i) {\r\n            if (!moments[i].isValid() || moments[i][fn](res)) {\r\n                res = moments[i];\r\n            }\r\n        }\r\n        return res;\r\n    }\r\n\r\n    // TODO: Use [].sort instead?\r\n    function min () {\r\n        var args = [].slice.call(arguments, 0);\r\n\r\n        return pickBy('isBefore', args);\r\n    }\r\n\r\n    function max () {\r\n        var args = [].slice.call(arguments, 0);\r\n\r\n        return pickBy('isAfter', args);\r\n    }\r\n\r\n    var now = function () {\r\n        return Date.now ? Date.now() : +(new Date());\r\n    };\r\n\r\n    function Duration (duration) {\r\n        var normalizedInput = normalizeObjectUnits(duration),\r\n            years = normalizedInput.year || 0,\r\n            quarters = normalizedInput.quarter || 0,\r\n            months = normalizedInput.month || 0,\r\n            weeks = normalizedInput.week || 0,\r\n            days = normalizedInput.day || 0,\r\n            hours = normalizedInput.hour || 0,\r\n            minutes = normalizedInput.minute || 0,\r\n            seconds = normalizedInput.second || 0,\r\n            milliseconds = normalizedInput.millisecond || 0;\r\n\r\n        // representation for dateAddRemove\r\n        this._milliseconds = +milliseconds +\r\n            seconds * 1e3 + // 1000\r\n            minutes * 6e4 + // 1000 * 60\r\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\r\n        // Because of dateAddRemove treats 24 hours as different from a\r\n        // day when working around DST, we need to store them separately\r\n        this._days = +days +\r\n            weeks * 7;\r\n        // It is impossible translate months into days without knowing\r\n        // which months you are are talking about, so we have to store\r\n        // it separately.\r\n        this._months = +months +\r\n            quarters * 3 +\r\n            years * 12;\r\n\r\n        this._data = {};\r\n\r\n        this._locale = locale_locales__getLocale();\r\n\r\n        this._bubble();\r\n    }\r\n\r\n    function isDuration (obj) {\r\n        return obj instanceof Duration;\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    function offset (token, separator) {\r\n        addFormatToken(token, 0, 0, function () {\r\n            var offset = this.utcOffset();\r\n            var sign = '+';\r\n            if (offset < 0) {\r\n                offset = -offset;\r\n                sign = '-';\r\n            }\r\n            return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\r\n        });\r\n    }\r\n\r\n    offset('Z', ':');\r\n    offset('ZZ', '');\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('Z',  matchShortOffset);\r\n    addRegexToken('ZZ', matchShortOffset);\r\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\r\n        config._useUTC = true;\r\n        config._tzm = offsetFromString(matchShortOffset, input);\r\n    });\r\n\r\n    // HELPERS\r\n\r\n    // timezone chunker\r\n    // '+10:00' > ['10',  '00']\r\n    // '-1530'  > ['-15', '30']\r\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\r\n\r\n    function offsetFromString(matcher, string) {\r\n        var matches = ((string || '').match(matcher) || []);\r\n        var chunk   = matches[matches.length - 1] || [];\r\n        var parts   = (chunk + '').match(chunkOffset) || ['-', 0, 0];\r\n        var minutes = +(parts[1] * 60) + toInt(parts[2]);\r\n\r\n        return parts[0] === '+' ? minutes : -minutes;\r\n    }\r\n\r\n    // Return a moment from input, that is local/utc/zone equivalent to model.\r\n    function cloneWithOffset(input, model) {\r\n        var res, diff;\r\n        if (model._isUTC) {\r\n            res = model.clone();\r\n            diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf();\r\n            // Use low-level api, because this fn is low-level api.\r\n            res._d.setTime(res._d.valueOf() + diff);\r\n            utils_hooks__hooks.updateOffset(res, false);\r\n            return res;\r\n        } else {\r\n            return local__createLocal(input).local();\r\n        }\r\n    }\r\n\r\n    function getDateOffset (m) {\r\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\r\n        // https://github.com/moment/moment/pull/1871\r\n        return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\r\n    }\r\n\r\n    // HOOKS\r\n\r\n    // This function will be called whenever a moment is mutated.\r\n    // It is intended to keep the offset in sync with the timezone.\r\n    utils_hooks__hooks.updateOffset = function () {};\r\n\r\n    // MOMENTS\r\n\r\n    // keepLocalTime = true means only change the timezone, without\r\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\r\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\r\n    // +0200, so we adjust the time as needed, to be valid.\r\n    //\r\n    // Keeping the time actually adds/subtracts (one hour)\r\n    // from the actual represented time. That is why we call updateOffset\r\n    // a second time. In case it wants us to change the offset again\r\n    // _changeInProgress == true case, then we have to adjust, because\r\n    // there is no such time in the given timezone.\r\n    function getSetOffset (input, keepLocalTime) {\r\n        var offset = this._offset || 0,\r\n            localAdjust;\r\n        if (!this.isValid()) {\r\n            return input != null ? this : NaN;\r\n        }\r\n        if (input != null) {\r\n            if (typeof input === 'string') {\r\n                input = offsetFromString(matchShortOffset, input);\r\n            } else if (Math.abs(input) < 16) {\r\n                input = input * 60;\r\n            }\r\n            if (!this._isUTC && keepLocalTime) {\r\n                localAdjust = getDateOffset(this);\r\n            }\r\n            this._offset = input;\r\n            this._isUTC = true;\r\n            if (localAdjust != null) {\r\n                this.add(localAdjust, 'm');\r\n            }\r\n            if (offset !== input) {\r\n                if (!keepLocalTime || this._changeInProgress) {\r\n                    add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\r\n                } else if (!this._changeInProgress) {\r\n                    this._changeInProgress = true;\r\n                    utils_hooks__hooks.updateOffset(this, true);\r\n                    this._changeInProgress = null;\r\n                }\r\n            }\r\n            return this;\r\n        } else {\r\n            return this._isUTC ? offset : getDateOffset(this);\r\n        }\r\n    }\r\n\r\n    function getSetZone (input, keepLocalTime) {\r\n        if (input != null) {\r\n            if (typeof input !== 'string') {\r\n                input = -input;\r\n            }\r\n\r\n            this.utcOffset(input, keepLocalTime);\r\n\r\n            return this;\r\n        } else {\r\n            return -this.utcOffset();\r\n        }\r\n    }\r\n\r\n    function setOffsetToUTC (keepLocalTime) {\r\n        return this.utcOffset(0, keepLocalTime);\r\n    }\r\n\r\n    function setOffsetToLocal (keepLocalTime) {\r\n        if (this._isUTC) {\r\n            this.utcOffset(0, keepLocalTime);\r\n            this._isUTC = false;\r\n\r\n            if (keepLocalTime) {\r\n                this.subtract(getDateOffset(this), 'm');\r\n            }\r\n        }\r\n        return this;\r\n    }\r\n\r\n    function setOffsetToParsedOffset () {\r\n        if (this._tzm) {\r\n            this.utcOffset(this._tzm);\r\n        } else if (typeof this._i === 'string') {\r\n            this.utcOffset(offsetFromString(matchOffset, this._i));\r\n        }\r\n        return this;\r\n    }\r\n\r\n    function hasAlignedHourOffset (input) {\r\n        if (!this.isValid()) {\r\n            return false;\r\n        }\r\n        input = input ? local__createLocal(input).utcOffset() : 0;\r\n\r\n        return (this.utcOffset() - input) % 60 === 0;\r\n    }\r\n\r\n    function isDaylightSavingTime () {\r\n        return (\r\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\r\n            this.utcOffset() > this.clone().month(5).utcOffset()\r\n        );\r\n    }\r\n\r\n    function isDaylightSavingTimeShifted () {\r\n        if (!isUndefined(this._isDSTShifted)) {\r\n            return this._isDSTShifted;\r\n        }\r\n\r\n        var c = {};\r\n\r\n        copyConfig(c, this);\r\n        c = prepareConfig(c);\r\n\r\n        if (c._a) {\r\n            var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);\r\n            this._isDSTShifted = this.isValid() &&\r\n                compareArrays(c._a, other.toArray()) > 0;\r\n        } else {\r\n            this._isDSTShifted = false;\r\n        }\r\n\r\n        return this._isDSTShifted;\r\n    }\r\n\r\n    function isLocal () {\r\n        return this.isValid() ? !this._isUTC : false;\r\n    }\r\n\r\n    function isUtcOffset () {\r\n        return this.isValid() ? this._isUTC : false;\r\n    }\r\n\r\n    function isUtc () {\r\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\r\n    }\r\n\r\n    // ASP.NET json date format regex\r\n    var aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)\\.?(\\d{3})?\\d*)?$/;\r\n\r\n    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\r\n    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\r\n    // and further modified to allow for strings containing both week and day\r\n    var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\r\n\r\n    function create__createDuration (input, key) {\r\n        var duration = input,\r\n            // matching against regexp is expensive, do it on demand\r\n            match = null,\r\n            sign,\r\n            ret,\r\n            diffRes;\r\n\r\n        if (isDuration(input)) {\r\n            duration = {\r\n                ms : input._milliseconds,\r\n                d  : input._days,\r\n                M  : input._months\r\n            };\r\n        } else if (typeof input === 'number') {\r\n            duration = {};\r\n            if (key) {\r\n                duration[key] = input;\r\n            } else {\r\n                duration.milliseconds = input;\r\n            }\r\n        } else if (!!(match = aspNetRegex.exec(input))) {\r\n            sign = (match[1] === '-') ? -1 : 1;\r\n            duration = {\r\n                y  : 0,\r\n                d  : toInt(match[DATE])        * sign,\r\n                h  : toInt(match[HOUR])        * sign,\r\n                m  : toInt(match[MINUTE])      * sign,\r\n                s  : toInt(match[SECOND])      * sign,\r\n                ms : toInt(match[MILLISECOND]) * sign\r\n            };\r\n        } else if (!!(match = isoRegex.exec(input))) {\r\n            sign = (match[1] === '-') ? -1 : 1;\r\n            duration = {\r\n                y : parseIso(match[2], sign),\r\n                M : parseIso(match[3], sign),\r\n                w : parseIso(match[4], sign),\r\n                d : parseIso(match[5], sign),\r\n                h : parseIso(match[6], sign),\r\n                m : parseIso(match[7], sign),\r\n                s : parseIso(match[8], sign)\r\n            };\r\n        } else if (duration == null) {// checks for null or undefined\r\n            duration = {};\r\n        } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\r\n            diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));\r\n\r\n            duration = {};\r\n            duration.ms = diffRes.milliseconds;\r\n            duration.M = diffRes.months;\r\n        }\r\n\r\n        ret = new Duration(duration);\r\n\r\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\r\n            ret._locale = input._locale;\r\n        }\r\n\r\n        return ret;\r\n    }\r\n\r\n    create__createDuration.fn = Duration.prototype;\r\n\r\n    function parseIso (inp, sign) {\r\n        // We'd normally use ~~inp for this, but unfortunately it also\r\n        // converts floats to ints.\r\n        // inp may be undefined, so careful calling replace on it.\r\n        var res = inp && parseFloat(inp.replace(',', '.'));\r\n        // apply sign while we're at it\r\n        return (isNaN(res) ? 0 : res) * sign;\r\n    }\r\n\r\n    function positiveMomentsDifference(base, other) {\r\n        var res = {milliseconds: 0, months: 0};\r\n\r\n        res.months = other.month() - base.month() +\r\n            (other.year() - base.year()) * 12;\r\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\r\n            --res.months;\r\n        }\r\n\r\n        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\r\n\r\n        return res;\r\n    }\r\n\r\n    function momentsDifference(base, other) {\r\n        var res;\r\n        if (!(base.isValid() && other.isValid())) {\r\n            return {milliseconds: 0, months: 0};\r\n        }\r\n\r\n        other = cloneWithOffset(other, base);\r\n        if (base.isBefore(other)) {\r\n            res = positiveMomentsDifference(base, other);\r\n        } else {\r\n            res = positiveMomentsDifference(other, base);\r\n            res.milliseconds = -res.milliseconds;\r\n            res.months = -res.months;\r\n        }\r\n\r\n        return res;\r\n    }\r\n\r\n    function absRound (number) {\r\n        if (number < 0) {\r\n            return Math.round(-1 * number) * -1;\r\n        } else {\r\n            return Math.round(number);\r\n        }\r\n    }\r\n\r\n    // TODO: remove 'name' arg after deprecation is removed\r\n    function createAdder(direction, name) {\r\n        return function (val, period) {\r\n            var dur, tmp;\r\n            //invert the arguments, but complain about it\r\n            if (period !== null && !isNaN(+period)) {\r\n                deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\r\n                'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\r\n                tmp = val; val = period; period = tmp;\r\n            }\r\n\r\n            val = typeof val === 'string' ? +val : val;\r\n            dur = create__createDuration(val, period);\r\n            add_subtract__addSubtract(this, dur, direction);\r\n            return this;\r\n        };\r\n    }\r\n\r\n    function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {\r\n        var milliseconds = duration._milliseconds,\r\n            days = absRound(duration._days),\r\n            months = absRound(duration._months);\r\n\r\n        if (!mom.isValid()) {\r\n            // No op\r\n            return;\r\n        }\r\n\r\n        updateOffset = updateOffset == null ? true : updateOffset;\r\n\r\n        if (milliseconds) {\r\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\r\n        }\r\n        if (days) {\r\n            get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);\r\n        }\r\n        if (months) {\r\n            setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);\r\n        }\r\n        if (updateOffset) {\r\n            utils_hooks__hooks.updateOffset(mom, days || months);\r\n        }\r\n    }\r\n\r\n    var add_subtract__add      = createAdder(1, 'add');\r\n    var add_subtract__subtract = createAdder(-1, 'subtract');\r\n\r\n    function getCalendarFormat(myMoment, now) {\r\n        var diff = myMoment.diff(now, 'days', true);\r\n        return diff < -6 ? 'sameElse' :\r\n                diff < -1 ? 'lastWeek' :\r\n                diff < 0 ? 'lastDay' :\r\n                diff < 1 ? 'sameDay' :\r\n                diff < 2 ? 'nextDay' :\r\n                diff < 7 ? 'nextWeek' : 'sameElse';\r\n    }\r\n\r\n    function moment_calendar__calendar (time, formats) {\r\n        // We want to compare the start of today, vs this.\r\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\r\n        var now = time || local__createLocal(),\r\n            sod = cloneWithOffset(now, this).startOf('day'),\r\n            format = utils_hooks__hooks.calendarFormat(this, sod) || 'sameElse';\r\n\r\n        var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\r\n\r\n        return this.format(output || this.localeData().calendar(format, this, local__createLocal(now)));\r\n    }\r\n\r\n    function clone () {\r\n        return new Moment(this);\r\n    }\r\n\r\n    function isAfter (input, units) {\r\n        var localInput = isMoment(input) ? input : local__createLocal(input);\r\n        if (!(this.isValid() && localInput.isValid())) {\r\n            return false;\r\n        }\r\n        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\r\n        if (units === 'millisecond') {\r\n            return this.valueOf() > localInput.valueOf();\r\n        } else {\r\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\r\n        }\r\n    }\r\n\r\n    function isBefore (input, units) {\r\n        var localInput = isMoment(input) ? input : local__createLocal(input);\r\n        if (!(this.isValid() && localInput.isValid())) {\r\n            return false;\r\n        }\r\n        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\r\n        if (units === 'millisecond') {\r\n            return this.valueOf() < localInput.valueOf();\r\n        } else {\r\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\r\n        }\r\n    }\r\n\r\n    function isBetween (from, to, units, inclusivity) {\r\n        inclusivity = inclusivity || '()';\r\n        return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\r\n            (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\r\n    }\r\n\r\n    function isSame (input, units) {\r\n        var localInput = isMoment(input) ? input : local__createLocal(input),\r\n            inputMs;\r\n        if (!(this.isValid() && localInput.isValid())) {\r\n            return false;\r\n        }\r\n        units = normalizeUnits(units || 'millisecond');\r\n        if (units === 'millisecond') {\r\n            return this.valueOf() === localInput.valueOf();\r\n        } else {\r\n            inputMs = localInput.valueOf();\r\n            return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\r\n        }\r\n    }\r\n\r\n    function isSameOrAfter (input, units) {\r\n        return this.isSame(input, units) || this.isAfter(input,units);\r\n    }\r\n\r\n    function isSameOrBefore (input, units) {\r\n        return this.isSame(input, units) || this.isBefore(input,units);\r\n    }\r\n\r\n    function diff (input, units, asFloat) {\r\n        var that,\r\n            zoneDelta,\r\n            delta, output;\r\n\r\n        if (!this.isValid()) {\r\n            return NaN;\r\n        }\r\n\r\n        that = cloneWithOffset(input, this);\r\n\r\n        if (!that.isValid()) {\r\n            return NaN;\r\n        }\r\n\r\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\r\n\r\n        units = normalizeUnits(units);\r\n\r\n        if (units === 'year' || units === 'month' || units === 'quarter') {\r\n            output = monthDiff(this, that);\r\n            if (units === 'quarter') {\r\n                output = output / 3;\r\n            } else if (units === 'year') {\r\n                output = output / 12;\r\n            }\r\n        } else {\r\n            delta = this - that;\r\n            output = units === 'second' ? delta / 1e3 : // 1000\r\n                units === 'minute' ? delta / 6e4 : // 1000 * 60\r\n                units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\r\n                units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\r\n                units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\r\n                delta;\r\n        }\r\n        return asFloat ? output : absFloor(output);\r\n    }\r\n\r\n    function monthDiff (a, b) {\r\n        // difference in months\r\n        var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\r\n            // b is in (anchor - 1 month, anchor + 1 month)\r\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\r\n            anchor2, adjust;\r\n\r\n        if (b - anchor < 0) {\r\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\r\n            // linear across the month\r\n            adjust = (b - anchor) / (anchor - anchor2);\r\n        } else {\r\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\r\n            // linear across the month\r\n            adjust = (b - anchor) / (anchor2 - anchor);\r\n        }\r\n\r\n        //check for negative zero, return zero if negative zero\r\n        return -(wholeMonthDiff + adjust) || 0;\r\n    }\r\n\r\n    utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\r\n    utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\r\n\r\n    function toString () {\r\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\r\n    }\r\n\r\n    function moment_format__toISOString () {\r\n        var m = this.clone().utc();\r\n        if (0 < m.year() && m.year() <= 9999) {\r\n            if (isFunction(Date.prototype.toISOString)) {\r\n                // native implementation is ~50x faster, use it when we can\r\n                return this.toDate().toISOString();\r\n            } else {\r\n                return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\r\n            }\r\n        } else {\r\n            return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\r\n        }\r\n    }\r\n\r\n    function format (inputString) {\r\n        if (!inputString) {\r\n            inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat;\r\n        }\r\n        var output = formatMoment(this, inputString);\r\n        return this.localeData().postformat(output);\r\n    }\r\n\r\n    function from (time, withoutSuffix) {\r\n        if (this.isValid() &&\r\n                ((isMoment(time) && time.isValid()) ||\r\n                 local__createLocal(time).isValid())) {\r\n            return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\r\n        } else {\r\n            return this.localeData().invalidDate();\r\n        }\r\n    }\r\n\r\n    function fromNow (withoutSuffix) {\r\n        return this.from(local__createLocal(), withoutSuffix);\r\n    }\r\n\r\n    function to (time, withoutSuffix) {\r\n        if (this.isValid() &&\r\n                ((isMoment(time) && time.isValid()) ||\r\n                 local__createLocal(time).isValid())) {\r\n            return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\r\n        } else {\r\n            return this.localeData().invalidDate();\r\n        }\r\n    }\r\n\r\n    function toNow (withoutSuffix) {\r\n        return this.to(local__createLocal(), withoutSuffix);\r\n    }\r\n\r\n    // If passed a locale key, it will set the locale for this\r\n    // instance.  Otherwise, it will return the locale configuration\r\n    // variables for this instance.\r\n    function locale (key) {\r\n        var newLocaleData;\r\n\r\n        if (key === undefined) {\r\n            return this._locale._abbr;\r\n        } else {\r\n            newLocaleData = locale_locales__getLocale(key);\r\n            if (newLocaleData != null) {\r\n                this._locale = newLocaleData;\r\n            }\r\n            return this;\r\n        }\r\n    }\r\n\r\n    var lang = deprecate(\r\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\r\n        function (key) {\r\n            if (key === undefined) {\r\n                return this.localeData();\r\n            } else {\r\n                return this.locale(key);\r\n            }\r\n        }\r\n    );\r\n\r\n    function localeData () {\r\n        return this._locale;\r\n    }\r\n\r\n    function startOf (units) {\r\n        units = normalizeUnits(units);\r\n        // the following switch intentionally omits break keywords\r\n        // to utilize falling through the cases.\r\n        switch (units) {\r\n            case 'year':\r\n                this.month(0);\r\n                /* falls through */\r\n            case 'quarter':\r\n            case 'month':\r\n                this.date(1);\r\n                /* falls through */\r\n            case 'week':\r\n            case 'isoWeek':\r\n            case 'day':\r\n            case 'date':\r\n                this.hours(0);\r\n                /* falls through */\r\n            case 'hour':\r\n                this.minutes(0);\r\n                /* falls through */\r\n            case 'minute':\r\n                this.seconds(0);\r\n                /* falls through */\r\n            case 'second':\r\n                this.milliseconds(0);\r\n        }\r\n\r\n        // weeks are a special case\r\n        if (units === 'week') {\r\n            this.weekday(0);\r\n        }\r\n        if (units === 'isoWeek') {\r\n            this.isoWeekday(1);\r\n        }\r\n\r\n        // quarters are also special\r\n        if (units === 'quarter') {\r\n            this.month(Math.floor(this.month() / 3) * 3);\r\n        }\r\n\r\n        return this;\r\n    }\r\n\r\n    function endOf (units) {\r\n        units = normalizeUnits(units);\r\n        if (units === undefined || units === 'millisecond') {\r\n            return this;\r\n        }\r\n\r\n        // 'date' is an alias for 'day', so it should be considered as such.\r\n        if (units === 'date') {\r\n            units = 'day';\r\n        }\r\n\r\n        return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\r\n    }\r\n\r\n    function to_type__valueOf () {\r\n        return this._d.valueOf() - ((this._offset || 0) * 60000);\r\n    }\r\n\r\n    function unix () {\r\n        return Math.floor(this.valueOf() / 1000);\r\n    }\r\n\r\n    function toDate () {\r\n        return new Date(this.valueOf());\r\n    }\r\n\r\n    function toArray () {\r\n        var m = this;\r\n        return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\r\n    }\r\n\r\n    function toObject () {\r\n        var m = this;\r\n        return {\r\n            years: m.year(),\r\n            months: m.month(),\r\n            date: m.date(),\r\n            hours: m.hours(),\r\n            minutes: m.minutes(),\r\n            seconds: m.seconds(),\r\n            milliseconds: m.milliseconds()\r\n        };\r\n    }\r\n\r\n    function toJSON () {\r\n        // new Date(NaN).toJSON() === null\r\n        return this.isValid() ? this.toISOString() : null;\r\n    }\r\n\r\n    function moment_valid__isValid () {\r\n        return valid__isValid(this);\r\n    }\r\n\r\n    function parsingFlags () {\r\n        return extend({}, getParsingFlags(this));\r\n    }\r\n\r\n    function invalidAt () {\r\n        return getParsingFlags(this).overflow;\r\n    }\r\n\r\n    function creationData() {\r\n        return {\r\n            input: this._i,\r\n            format: this._f,\r\n            locale: this._locale,\r\n            isUTC: this._isUTC,\r\n            strict: this._strict\r\n        };\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken(0, ['gg', 2], 0, function () {\r\n        return this.weekYear() % 100;\r\n    });\r\n\r\n    addFormatToken(0, ['GG', 2], 0, function () {\r\n        return this.isoWeekYear() % 100;\r\n    });\r\n\r\n    function addWeekYearFormatToken (token, getter) {\r\n        addFormatToken(0, [token, token.length], 0, getter);\r\n    }\r\n\r\n    addWeekYearFormatToken('gggg',     'weekYear');\r\n    addWeekYearFormatToken('ggggg',    'weekYear');\r\n    addWeekYearFormatToken('GGGG',  'isoWeekYear');\r\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('weekYear', 'gg');\r\n    addUnitAlias('isoWeekYear', 'GG');\r\n\r\n    // PRIORITY\r\n\r\n    addUnitPriority('weekYear', 1);\r\n    addUnitPriority('isoWeekYear', 1);\r\n\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('G',      matchSigned);\r\n    addRegexToken('g',      matchSigned);\r\n    addRegexToken('GG',     match1to2, match2);\r\n    addRegexToken('gg',     match1to2, match2);\r\n    addRegexToken('GGGG',   match1to4, match4);\r\n    addRegexToken('gggg',   match1to4, match4);\r\n    addRegexToken('GGGGG',  match1to6, match6);\r\n    addRegexToken('ggggg',  match1to6, match6);\r\n\r\n    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\r\n        week[token.substr(0, 2)] = toInt(input);\r\n    });\r\n\r\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\r\n        week[token] = utils_hooks__hooks.parseTwoDigitYear(input);\r\n    });\r\n\r\n    // MOMENTS\r\n\r\n    function getSetWeekYear (input) {\r\n        return getSetWeekYearHelper.call(this,\r\n                input,\r\n                this.week(),\r\n                this.weekday(),\r\n                this.localeData()._week.dow,\r\n                this.localeData()._week.doy);\r\n    }\r\n\r\n    function getSetISOWeekYear (input) {\r\n        return getSetWeekYearHelper.call(this,\r\n                input, this.isoWeek(), this.isoWeekday(), 1, 4);\r\n    }\r\n\r\n    function getISOWeeksInYear () {\r\n        return weeksInYear(this.year(), 1, 4);\r\n    }\r\n\r\n    function getWeeksInYear () {\r\n        var weekInfo = this.localeData()._week;\r\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\r\n    }\r\n\r\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\r\n        var weeksTarget;\r\n        if (input == null) {\r\n            return weekOfYear(this, dow, doy).year;\r\n        } else {\r\n            weeksTarget = weeksInYear(input, dow, doy);\r\n            if (week > weeksTarget) {\r\n                week = weeksTarget;\r\n            }\r\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\r\n        }\r\n    }\r\n\r\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\r\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\r\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\r\n\r\n        this.year(date.getUTCFullYear());\r\n        this.month(date.getUTCMonth());\r\n        this.date(date.getUTCDate());\r\n        return this;\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('Q', 0, 'Qo', 'quarter');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('quarter', 'Q');\r\n\r\n    // PRIORITY\r\n\r\n    addUnitPriority('quarter', 7);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('Q', match1);\r\n    addParseToken('Q', function (input, array) {\r\n        array[MONTH] = (toInt(input) - 1) * 3;\r\n    });\r\n\r\n    // MOMENTS\r\n\r\n    function getSetQuarter (input) {\r\n        return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('date', 'D');\r\n\r\n    // PRIOROITY\r\n    addUnitPriority('date', 9);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('D',  match1to2);\r\n    addRegexToken('DD', match1to2, match2);\r\n    addRegexToken('Do', function (isStrict, locale) {\r\n        return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\r\n    });\r\n\r\n    addParseToken(['D', 'DD'], DATE);\r\n    addParseToken('Do', function (input, array) {\r\n        array[DATE] = toInt(input.match(match1to2)[0], 10);\r\n    });\r\n\r\n    // MOMENTS\r\n\r\n    var getSetDayOfMonth = makeGetSet('Date', true);\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('dayOfYear', 'DDD');\r\n\r\n    // PRIORITY\r\n    addUnitPriority('dayOfYear', 4);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('DDD',  match1to3);\r\n    addRegexToken('DDDD', match3);\r\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\r\n        config._dayOfYear = toInt(input);\r\n    });\r\n\r\n    // HELPERS\r\n\r\n    // MOMENTS\r\n\r\n    function getSetDayOfYear (input) {\r\n        var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\r\n        return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\r\n    }\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('m', ['mm', 2], 0, 'minute');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('minute', 'm');\r\n\r\n    // PRIORITY\r\n\r\n    addUnitPriority('minute', 14);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('m',  match1to2);\r\n    addRegexToken('mm', match1to2, match2);\r\n    addParseToken(['m', 'mm'], MINUTE);\r\n\r\n    // MOMENTS\r\n\r\n    var getSetMinute = makeGetSet('Minutes', false);\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('s', ['ss', 2], 0, 'second');\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('second', 's');\r\n\r\n    // PRIORITY\r\n\r\n    addUnitPriority('second', 15);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('s',  match1to2);\r\n    addRegexToken('ss', match1to2, match2);\r\n    addParseToken(['s', 'ss'], SECOND);\r\n\r\n    // MOMENTS\r\n\r\n    var getSetSecond = makeGetSet('Seconds', false);\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('S', 0, 0, function () {\r\n        return ~~(this.millisecond() / 100);\r\n    });\r\n\r\n    addFormatToken(0, ['SS', 2], 0, function () {\r\n        return ~~(this.millisecond() / 10);\r\n    });\r\n\r\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\r\n    addFormatToken(0, ['SSSS', 4], 0, function () {\r\n        return this.millisecond() * 10;\r\n    });\r\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\r\n        return this.millisecond() * 100;\r\n    });\r\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\r\n        return this.millisecond() * 1000;\r\n    });\r\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\r\n        return this.millisecond() * 10000;\r\n    });\r\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\r\n        return this.millisecond() * 100000;\r\n    });\r\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\r\n        return this.millisecond() * 1000000;\r\n    });\r\n\r\n\r\n    // ALIASES\r\n\r\n    addUnitAlias('millisecond', 'ms');\r\n\r\n    // PRIORITY\r\n\r\n    addUnitPriority('millisecond', 16);\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('S',    match1to3, match1);\r\n    addRegexToken('SS',   match1to3, match2);\r\n    addRegexToken('SSS',  match1to3, match3);\r\n\r\n    var token;\r\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\r\n        addRegexToken(token, matchUnsigned);\r\n    }\r\n\r\n    function parseMs(input, array) {\r\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\r\n    }\r\n\r\n    for (token = 'S'; token.length <= 9; token += 'S') {\r\n        addParseToken(token, parseMs);\r\n    }\r\n    // MOMENTS\r\n\r\n    var getSetMillisecond = makeGetSet('Milliseconds', false);\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('z',  0, 0, 'zoneAbbr');\r\n    addFormatToken('zz', 0, 0, 'zoneName');\r\n\r\n    // MOMENTS\r\n\r\n    function getZoneAbbr () {\r\n        return this._isUTC ? 'UTC' : '';\r\n    }\r\n\r\n    function getZoneName () {\r\n        return this._isUTC ? 'Coordinated Universal Time' : '';\r\n    }\r\n\r\n    var momentPrototype__proto = Moment.prototype;\r\n\r\n    momentPrototype__proto.add               = add_subtract__add;\r\n    momentPrototype__proto.calendar          = moment_calendar__calendar;\r\n    momentPrototype__proto.clone             = clone;\r\n    momentPrototype__proto.diff              = diff;\r\n    momentPrototype__proto.endOf             = endOf;\r\n    momentPrototype__proto.format            = format;\r\n    momentPrototype__proto.from              = from;\r\n    momentPrototype__proto.fromNow           = fromNow;\r\n    momentPrototype__proto.to                = to;\r\n    momentPrototype__proto.toNow             = toNow;\r\n    momentPrototype__proto.get               = stringGet;\r\n    momentPrototype__proto.invalidAt         = invalidAt;\r\n    momentPrototype__proto.isAfter           = isAfter;\r\n    momentPrototype__proto.isBefore          = isBefore;\r\n    momentPrototype__proto.isBetween         = isBetween;\r\n    momentPrototype__proto.isSame            = isSame;\r\n    momentPrototype__proto.isSameOrAfter     = isSameOrAfter;\r\n    momentPrototype__proto.isSameOrBefore    = isSameOrBefore;\r\n    momentPrototype__proto.isValid           = moment_valid__isValid;\r\n    momentPrototype__proto.lang              = lang;\r\n    momentPrototype__proto.locale            = locale;\r\n    momentPrototype__proto.localeData        = localeData;\r\n    momentPrototype__proto.max               = prototypeMax;\r\n    momentPrototype__proto.min               = prototypeMin;\r\n    momentPrototype__proto.parsingFlags      = parsingFlags;\r\n    momentPrototype__proto.set               = stringSet;\r\n    momentPrototype__proto.startOf           = startOf;\r\n    momentPrototype__proto.subtract          = add_subtract__subtract;\r\n    momentPrototype__proto.toArray           = toArray;\r\n    momentPrototype__proto.toObject          = toObject;\r\n    momentPrototype__proto.toDate            = toDate;\r\n    momentPrototype__proto.toISOString       = moment_format__toISOString;\r\n    momentPrototype__proto.toJSON            = toJSON;\r\n    momentPrototype__proto.toString          = toString;\r\n    momentPrototype__proto.unix              = unix;\r\n    momentPrototype__proto.valueOf           = to_type__valueOf;\r\n    momentPrototype__proto.creationData      = creationData;\r\n\r\n    // Year\r\n    momentPrototype__proto.year       = getSetYear;\r\n    momentPrototype__proto.isLeapYear = getIsLeapYear;\r\n\r\n    // Week Year\r\n    momentPrototype__proto.weekYear    = getSetWeekYear;\r\n    momentPrototype__proto.isoWeekYear = getSetISOWeekYear;\r\n\r\n    // Quarter\r\n    momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;\r\n\r\n    // Month\r\n    momentPrototype__proto.month       = getSetMonth;\r\n    momentPrototype__proto.daysInMonth = getDaysInMonth;\r\n\r\n    // Week\r\n    momentPrototype__proto.week           = momentPrototype__proto.weeks        = getSetWeek;\r\n    momentPrototype__proto.isoWeek        = momentPrototype__proto.isoWeeks     = getSetISOWeek;\r\n    momentPrototype__proto.weeksInYear    = getWeeksInYear;\r\n    momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;\r\n\r\n    // Day\r\n    momentPrototype__proto.date       = getSetDayOfMonth;\r\n    momentPrototype__proto.day        = momentPrototype__proto.days             = getSetDayOfWeek;\r\n    momentPrototype__proto.weekday    = getSetLocaleDayOfWeek;\r\n    momentPrototype__proto.isoWeekday = getSetISODayOfWeek;\r\n    momentPrototype__proto.dayOfYear  = getSetDayOfYear;\r\n\r\n    // Hour\r\n    momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;\r\n\r\n    // Minute\r\n    momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;\r\n\r\n    // Second\r\n    momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;\r\n\r\n    // Millisecond\r\n    momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;\r\n\r\n    // Offset\r\n    momentPrototype__proto.utcOffset            = getSetOffset;\r\n    momentPrototype__proto.utc                  = setOffsetToUTC;\r\n    momentPrototype__proto.local                = setOffsetToLocal;\r\n    momentPrototype__proto.parseZone            = setOffsetToParsedOffset;\r\n    momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;\r\n    momentPrototype__proto.isDST                = isDaylightSavingTime;\r\n    momentPrototype__proto.isLocal              = isLocal;\r\n    momentPrototype__proto.isUtcOffset          = isUtcOffset;\r\n    momentPrototype__proto.isUtc                = isUtc;\r\n    momentPrototype__proto.isUTC                = isUtc;\r\n\r\n    // Timezone\r\n    momentPrototype__proto.zoneAbbr = getZoneAbbr;\r\n    momentPrototype__proto.zoneName = getZoneName;\r\n\r\n    // Deprecations\r\n    momentPrototype__proto.dates  = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\r\n    momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\r\n    momentPrototype__proto.years  = deprecate('years accessor is deprecated. Use year instead', getSetYear);\r\n    momentPrototype__proto.zone   = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\r\n    momentPrototype__proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\r\n\r\n    var momentPrototype = momentPrototype__proto;\r\n\r\n    function moment__createUnix (input) {\r\n        return local__createLocal(input * 1000);\r\n    }\r\n\r\n    function moment__createInZone () {\r\n        return local__createLocal.apply(null, arguments).parseZone();\r\n    }\r\n\r\n    function preParsePostFormat (string) {\r\n        return string;\r\n    }\r\n\r\n    var prototype__proto = Locale.prototype;\r\n\r\n    prototype__proto.calendar        = locale_calendar__calendar;\r\n    prototype__proto.longDateFormat  = longDateFormat;\r\n    prototype__proto.invalidDate     = invalidDate;\r\n    prototype__proto.ordinal         = ordinal;\r\n    prototype__proto.preparse        = preParsePostFormat;\r\n    prototype__proto.postformat      = preParsePostFormat;\r\n    prototype__proto.relativeTime    = relative__relativeTime;\r\n    prototype__proto.pastFuture      = pastFuture;\r\n    prototype__proto.set             = locale_set__set;\r\n\r\n    // Month\r\n    prototype__proto.months            =        localeMonths;\r\n    prototype__proto.monthsShort       =        localeMonthsShort;\r\n    prototype__proto.monthsParse       =        localeMonthsParse;\r\n    prototype__proto.monthsRegex       = monthsRegex;\r\n    prototype__proto.monthsShortRegex  = monthsShortRegex;\r\n\r\n    // Week\r\n    prototype__proto.week = localeWeek;\r\n    prototype__proto.firstDayOfYear = localeFirstDayOfYear;\r\n    prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;\r\n\r\n    // Day of Week\r\n    prototype__proto.weekdays       =        localeWeekdays;\r\n    prototype__proto.weekdaysMin    =        localeWeekdaysMin;\r\n    prototype__proto.weekdaysShort  =        localeWeekdaysShort;\r\n    prototype__proto.weekdaysParse  =        localeWeekdaysParse;\r\n\r\n    prototype__proto.weekdaysRegex       =        weekdaysRegex;\r\n    prototype__proto.weekdaysShortRegex  =        weekdaysShortRegex;\r\n    prototype__proto.weekdaysMinRegex    =        weekdaysMinRegex;\r\n\r\n    // Hours\r\n    prototype__proto.isPM = localeIsPM;\r\n    prototype__proto.meridiem = localeMeridiem;\r\n\r\n    function lists__get (format, index, field, setter) {\r\n        var locale = locale_locales__getLocale();\r\n        var utc = create_utc__createUTC().set(setter, index);\r\n        return locale[field](utc, format);\r\n    }\r\n\r\n    function listMonthsImpl (format, index, field) {\r\n        if (typeof format === 'number') {\r\n            index = format;\r\n            format = undefined;\r\n        }\r\n\r\n        format = format || '';\r\n\r\n        if (index != null) {\r\n            return lists__get(format, index, field, 'month');\r\n        }\r\n\r\n        var i;\r\n        var out = [];\r\n        for (i = 0; i < 12; i++) {\r\n            out[i] = lists__get(format, i, field, 'month');\r\n        }\r\n        return out;\r\n    }\r\n\r\n    // ()\r\n    // (5)\r\n    // (fmt, 5)\r\n    // (fmt)\r\n    // (true)\r\n    // (true, 5)\r\n    // (true, fmt, 5)\r\n    // (true, fmt)\r\n    function listWeekdaysImpl (localeSorted, format, index, field) {\r\n        if (typeof localeSorted === 'boolean') {\r\n            if (typeof format === 'number') {\r\n                index = format;\r\n                format = undefined;\r\n            }\r\n\r\n            format = format || '';\r\n        } else {\r\n            format = localeSorted;\r\n            index = format;\r\n            localeSorted = false;\r\n\r\n            if (typeof format === 'number') {\r\n                index = format;\r\n                format = undefined;\r\n            }\r\n\r\n            format = format || '';\r\n        }\r\n\r\n        var locale = locale_locales__getLocale(),\r\n            shift = localeSorted ? locale._week.dow : 0;\r\n\r\n        if (index != null) {\r\n            return lists__get(format, (index + shift) % 7, field, 'day');\r\n        }\r\n\r\n        var i;\r\n        var out = [];\r\n        for (i = 0; i < 7; i++) {\r\n            out[i] = lists__get(format, (i + shift) % 7, field, 'day');\r\n        }\r\n        return out;\r\n    }\r\n\r\n    function lists__listMonths (format, index) {\r\n        return listMonthsImpl(format, index, 'months');\r\n    }\r\n\r\n    function lists__listMonthsShort (format, index) {\r\n        return listMonthsImpl(format, index, 'monthsShort');\r\n    }\r\n\r\n    function lists__listWeekdays (localeSorted, format, index) {\r\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\r\n    }\r\n\r\n    function lists__listWeekdaysShort (localeSorted, format, index) {\r\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\r\n    }\r\n\r\n    function lists__listWeekdaysMin (localeSorted, format, index) {\r\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\r\n    }\r\n\r\n    locale_locales__getSetGlobalLocale('en', {\r\n        ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\r\n        ordinal : function (number) {\r\n            var b = number % 10,\r\n                output = (toInt(number % 100 / 10) === 1) ? 'th' :\r\n                (b === 1) ? 'st' :\r\n                (b === 2) ? 'nd' :\r\n                (b === 3) ? 'rd' : 'th';\r\n            return number + output;\r\n        }\r\n    });\r\n\r\n    // Side effect imports\r\n    utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);\r\n    utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);\r\n\r\n    var mathAbs = Math.abs;\r\n\r\n    function duration_abs__abs () {\r\n        var data           = this._data;\r\n\r\n        this._milliseconds = mathAbs(this._milliseconds);\r\n        this._days         = mathAbs(this._days);\r\n        this._months       = mathAbs(this._months);\r\n\r\n        data.milliseconds  = mathAbs(data.milliseconds);\r\n        data.seconds       = mathAbs(data.seconds);\r\n        data.minutes       = mathAbs(data.minutes);\r\n        data.hours         = mathAbs(data.hours);\r\n        data.months        = mathAbs(data.months);\r\n        data.years         = mathAbs(data.years);\r\n\r\n        return this;\r\n    }\r\n\r\n    function duration_add_subtract__addSubtract (duration, input, value, direction) {\r\n        var other = create__createDuration(input, value);\r\n\r\n        duration._milliseconds += direction * other._milliseconds;\r\n        duration._days         += direction * other._days;\r\n        duration._months       += direction * other._months;\r\n\r\n        return duration._bubble();\r\n    }\r\n\r\n    // supports only 2.0-style add(1, 's') or add(duration)\r\n    function duration_add_subtract__add (input, value) {\r\n        return duration_add_subtract__addSubtract(this, input, value, 1);\r\n    }\r\n\r\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\r\n    function duration_add_subtract__subtract (input, value) {\r\n        return duration_add_subtract__addSubtract(this, input, value, -1);\r\n    }\r\n\r\n    function absCeil (number) {\r\n        if (number < 0) {\r\n            return Math.floor(number);\r\n        } else {\r\n            return Math.ceil(number);\r\n        }\r\n    }\r\n\r\n    function bubble () {\r\n        var milliseconds = this._milliseconds;\r\n        var days         = this._days;\r\n        var months       = this._months;\r\n        var data         = this._data;\r\n        var seconds, minutes, hours, years, monthsFromDays;\r\n\r\n        // if we have a mix of positive and negative values, bubble down first\r\n        // check: https://github.com/moment/moment/issues/2166\r\n        if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\r\n                (milliseconds <= 0 && days <= 0 && months <= 0))) {\r\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\r\n            days = 0;\r\n            months = 0;\r\n        }\r\n\r\n        // The following code bubbles up values, see the tests for\r\n        // examples of what that means.\r\n        data.milliseconds = milliseconds % 1000;\r\n\r\n        seconds           = absFloor(milliseconds / 1000);\r\n        data.seconds      = seconds % 60;\r\n\r\n        minutes           = absFloor(seconds / 60);\r\n        data.minutes      = minutes % 60;\r\n\r\n        hours             = absFloor(minutes / 60);\r\n        data.hours        = hours % 24;\r\n\r\n        days += absFloor(hours / 24);\r\n\r\n        // convert days to months\r\n        monthsFromDays = absFloor(daysToMonths(days));\r\n        months += monthsFromDays;\r\n        days -= absCeil(monthsToDays(monthsFromDays));\r\n\r\n        // 12 months -> 1 year\r\n        years = absFloor(months / 12);\r\n        months %= 12;\r\n\r\n        data.days   = days;\r\n        data.months = months;\r\n        data.years  = years;\r\n\r\n        return this;\r\n    }\r\n\r\n    function daysToMonths (days) {\r\n        // 400 years have 146097 days (taking into account leap year rules)\r\n        // 400 years have 12 months === 4800\r\n        return days * 4800 / 146097;\r\n    }\r\n\r\n    function monthsToDays (months) {\r\n        // the reverse of daysToMonths\r\n        return months * 146097 / 4800;\r\n    }\r\n\r\n    function as (units) {\r\n        var days;\r\n        var months;\r\n        var milliseconds = this._milliseconds;\r\n\r\n        units = normalizeUnits(units);\r\n\r\n        if (units === 'month' || units === 'year') {\r\n            days   = this._days   + milliseconds / 864e5;\r\n            months = this._months + daysToMonths(days);\r\n            return units === 'month' ? months : months / 12;\r\n        } else {\r\n            // handle milliseconds separately because of floating point math errors (issue #1867)\r\n            days = this._days + Math.round(monthsToDays(this._months));\r\n            switch (units) {\r\n                case 'week'   : return days / 7     + milliseconds / 6048e5;\r\n                case 'day'    : return days         + milliseconds / 864e5;\r\n                case 'hour'   : return days * 24    + milliseconds / 36e5;\r\n                case 'minute' : return days * 1440  + milliseconds / 6e4;\r\n                case 'second' : return days * 86400 + milliseconds / 1000;\r\n                // Math.floor prevents floating point math errors here\r\n                case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\r\n                default: throw new Error('Unknown unit ' + units);\r\n            }\r\n        }\r\n    }\r\n\r\n    // TODO: Use this.as('ms')?\r\n    function duration_as__valueOf () {\r\n        return (\r\n            this._milliseconds +\r\n            this._days * 864e5 +\r\n            (this._months % 12) * 2592e6 +\r\n            toInt(this._months / 12) * 31536e6\r\n        );\r\n    }\r\n\r\n    function makeAs (alias) {\r\n        return function () {\r\n            return this.as(alias);\r\n        };\r\n    }\r\n\r\n    var asMilliseconds = makeAs('ms');\r\n    var asSeconds      = makeAs('s');\r\n    var asMinutes      = makeAs('m');\r\n    var asHours        = makeAs('h');\r\n    var asDays         = makeAs('d');\r\n    var asWeeks        = makeAs('w');\r\n    var asMonths       = makeAs('M');\r\n    var asYears        = makeAs('y');\r\n\r\n    function duration_get__get (units) {\r\n        units = normalizeUnits(units);\r\n        return this[units + 's']();\r\n    }\r\n\r\n    function makeGetter(name) {\r\n        return function () {\r\n            return this._data[name];\r\n        };\r\n    }\r\n\r\n    var milliseconds = makeGetter('milliseconds');\r\n    var seconds      = makeGetter('seconds');\r\n    var minutes      = makeGetter('minutes');\r\n    var hours        = makeGetter('hours');\r\n    var days         = makeGetter('days');\r\n    var months       = makeGetter('months');\r\n    var years        = makeGetter('years');\r\n\r\n    function weeks () {\r\n        return absFloor(this.days() / 7);\r\n    }\r\n\r\n    var round = Math.round;\r\n    var thresholds = {\r\n        s: 45,  // seconds to minute\r\n        m: 45,  // minutes to hour\r\n        h: 22,  // hours to day\r\n        d: 26,  // days to month\r\n        M: 11   // months to year\r\n    };\r\n\r\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\r\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\r\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\r\n    }\r\n\r\n    function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {\r\n        var duration = create__createDuration(posNegDuration).abs();\r\n        var seconds  = round(duration.as('s'));\r\n        var minutes  = round(duration.as('m'));\r\n        var hours    = round(duration.as('h'));\r\n        var days     = round(duration.as('d'));\r\n        var months   = round(duration.as('M'));\r\n        var years    = round(duration.as('y'));\r\n\r\n        var a = seconds < thresholds.s && ['s', seconds]  ||\r\n                minutes <= 1           && ['m']           ||\r\n                minutes < thresholds.m && ['mm', minutes] ||\r\n                hours   <= 1           && ['h']           ||\r\n                hours   < thresholds.h && ['hh', hours]   ||\r\n                days    <= 1           && ['d']           ||\r\n                days    < thresholds.d && ['dd', days]    ||\r\n                months  <= 1           && ['M']           ||\r\n                months  < thresholds.M && ['MM', months]  ||\r\n                years   <= 1           && ['y']           || ['yy', years];\r\n\r\n        a[2] = withoutSuffix;\r\n        a[3] = +posNegDuration > 0;\r\n        a[4] = locale;\r\n        return substituteTimeAgo.apply(null, a);\r\n    }\r\n\r\n    // This function allows you to set the rounding function for relative time strings\r\n    function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\r\n        if (roundingFunction === undefined) {\r\n            return round;\r\n        }\r\n        if (typeof(roundingFunction) === 'function') {\r\n            round = roundingFunction;\r\n            return true;\r\n        }\r\n        return false;\r\n    }\r\n\r\n    // This function allows you to set a threshold for relative time strings\r\n    function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\r\n        if (thresholds[threshold] === undefined) {\r\n            return false;\r\n        }\r\n        if (limit === undefined) {\r\n            return thresholds[threshold];\r\n        }\r\n        thresholds[threshold] = limit;\r\n        return true;\r\n    }\r\n\r\n    function humanize (withSuffix) {\r\n        var locale = this.localeData();\r\n        var output = duration_humanize__relativeTime(this, !withSuffix, locale);\r\n\r\n        if (withSuffix) {\r\n            output = locale.pastFuture(+this, output);\r\n        }\r\n\r\n        return locale.postformat(output);\r\n    }\r\n\r\n    var iso_string__abs = Math.abs;\r\n\r\n    function iso_string__toISOString() {\r\n        // for ISO strings we do not use the normal bubbling rules:\r\n        //  * milliseconds bubble up until they become hours\r\n        //  * days do not bubble at all\r\n        //  * months bubble up until they become years\r\n        // This is because there is no context-free conversion between hours and days\r\n        // (think of clock changes)\r\n        // and also not between days and months (28-31 days per month)\r\n        var seconds = iso_string__abs(this._milliseconds) / 1000;\r\n        var days         = iso_string__abs(this._days);\r\n        var months       = iso_string__abs(this._months);\r\n        var minutes, hours, years;\r\n\r\n        // 3600 seconds -> 60 minutes -> 1 hour\r\n        minutes           = absFloor(seconds / 60);\r\n        hours             = absFloor(minutes / 60);\r\n        seconds %= 60;\r\n        minutes %= 60;\r\n\r\n        // 12 months -> 1 year\r\n        years  = absFloor(months / 12);\r\n        months %= 12;\r\n\r\n\r\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\r\n        var Y = years;\r\n        var M = months;\r\n        var D = days;\r\n        var h = hours;\r\n        var m = minutes;\r\n        var s = seconds;\r\n        var total = this.asSeconds();\r\n\r\n        if (!total) {\r\n            // this is the same as C#'s (Noda) and python (isodate)...\r\n            // but not other JS (goog.date)\r\n            return 'P0D';\r\n        }\r\n\r\n        return (total < 0 ? '-' : '') +\r\n            'P' +\r\n            (Y ? Y + 'Y' : '') +\r\n            (M ? M + 'M' : '') +\r\n            (D ? D + 'D' : '') +\r\n            ((h || m || s) ? 'T' : '') +\r\n            (h ? h + 'H' : '') +\r\n            (m ? m + 'M' : '') +\r\n            (s ? s + 'S' : '');\r\n    }\r\n\r\n    var duration_prototype__proto = Duration.prototype;\r\n\r\n    duration_prototype__proto.abs            = duration_abs__abs;\r\n    duration_prototype__proto.add            = duration_add_subtract__add;\r\n    duration_prototype__proto.subtract       = duration_add_subtract__subtract;\r\n    duration_prototype__proto.as             = as;\r\n    duration_prototype__proto.asMilliseconds = asMilliseconds;\r\n    duration_prototype__proto.asSeconds      = asSeconds;\r\n    duration_prototype__proto.asMinutes      = asMinutes;\r\n    duration_prototype__proto.asHours        = asHours;\r\n    duration_prototype__proto.asDays         = asDays;\r\n    duration_prototype__proto.asWeeks        = asWeeks;\r\n    duration_prototype__proto.asMonths       = asMonths;\r\n    duration_prototype__proto.asYears        = asYears;\r\n    duration_prototype__proto.valueOf        = duration_as__valueOf;\r\n    duration_prototype__proto._bubble        = bubble;\r\n    duration_prototype__proto.get            = duration_get__get;\r\n    duration_prototype__proto.milliseconds   = milliseconds;\r\n    duration_prototype__proto.seconds        = seconds;\r\n    duration_prototype__proto.minutes        = minutes;\r\n    duration_prototype__proto.hours          = hours;\r\n    duration_prototype__proto.days           = days;\r\n    duration_prototype__proto.weeks          = weeks;\r\n    duration_prototype__proto.months         = months;\r\n    duration_prototype__proto.years          = years;\r\n    duration_prototype__proto.humanize       = humanize;\r\n    duration_prototype__proto.toISOString    = iso_string__toISOString;\r\n    duration_prototype__proto.toString       = iso_string__toISOString;\r\n    duration_prototype__proto.toJSON         = iso_string__toISOString;\r\n    duration_prototype__proto.locale         = locale;\r\n    duration_prototype__proto.localeData     = localeData;\r\n\r\n    // Deprecations\r\n    duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);\r\n    duration_prototype__proto.lang = lang;\r\n\r\n    // Side effect imports\r\n\r\n    // FORMATTING\r\n\r\n    addFormatToken('X', 0, 0, 'unix');\r\n    addFormatToken('x', 0, 0, 'valueOf');\r\n\r\n    // PARSING\r\n\r\n    addRegexToken('x', matchSigned);\r\n    addRegexToken('X', matchTimestamp);\r\n    addParseToken('X', function (input, array, config) {\r\n        config._d = new Date(parseFloat(input, 10) * 1000);\r\n    });\r\n    addParseToken('x', function (input, array, config) {\r\n        config._d = new Date(toInt(input));\r\n    });\r\n\r\n    // Side effect imports\r\n\r\n\r\n    utils_hooks__hooks.version = '2.14.1';\r\n\r\n    setHookCallback(local__createLocal);\r\n\r\n    utils_hooks__hooks.fn                    = momentPrototype;\r\n    utils_hooks__hooks.min                   = min;\r\n    utils_hooks__hooks.max                   = max;\r\n    utils_hooks__hooks.now                   = now;\r\n    utils_hooks__hooks.utc                   = create_utc__createUTC;\r\n    utils_hooks__hooks.unix                  = moment__createUnix;\r\n    utils_hooks__hooks.months                = lists__listMonths;\r\n    utils_hooks__hooks.isDate                = isDate;\r\n    utils_hooks__hooks.locale                = locale_locales__getSetGlobalLocale;\r\n    utils_hooks__hooks.invalid               = valid__createInvalid;\r\n    utils_hooks__hooks.duration              = create__createDuration;\r\n    utils_hooks__hooks.isMoment              = isMoment;\r\n    utils_hooks__hooks.weekdays              = lists__listWeekdays;\r\n    utils_hooks__hooks.parseZone             = moment__createInZone;\r\n    utils_hooks__hooks.localeData            = locale_locales__getLocale;\r\n    utils_hooks__hooks.isDuration            = isDuration;\r\n    utils_hooks__hooks.monthsShort           = lists__listMonthsShort;\r\n    utils_hooks__hooks.weekdaysMin           = lists__listWeekdaysMin;\r\n    utils_hooks__hooks.defineLocale          = defineLocale;\r\n    utils_hooks__hooks.updateLocale          = updateLocale;\r\n    utils_hooks__hooks.locales               = locale_locales__listLocales;\r\n    utils_hooks__hooks.weekdaysShort         = lists__listWeekdaysShort;\r\n    utils_hooks__hooks.normalizeUnits        = normalizeUnits;\r\n    utils_hooks__hooks.relativeTimeRounding = duration_humanize__getSetRelativeTimeRounding;\r\n    utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;\r\n    utils_hooks__hooks.calendarFormat        = getCalendarFormat;\r\n    utils_hooks__hooks.prototype             = momentPrototype;\r\n\r\n    var _moment = utils_hooks__hooks;\r\n\r\n    return _moment;\r\n\r\n}));\r\n},{}],7:[function(require,module,exports){\r\n/**\r\n * @namespace Chart\r\n */\r\nvar Chart = require(27)();\r\n\r\nrequire(26)(Chart);\r\nrequire(22)(Chart);\r\nrequire(25)(Chart);\r\nrequire(21)(Chart);\r\nrequire(23)(Chart);\r\nrequire(24)(Chart);\r\nrequire(28)(Chart);\r\nrequire(32)(Chart);\r\nrequire(30)(Chart);\r\nrequire(31)(Chart);\r\nrequire(33)(Chart);\r\nrequire(29)(Chart);\r\nrequire(34)(Chart);\r\n\r\nrequire(35)(Chart);\r\nrequire(36)(Chart);\r\nrequire(37)(Chart);\r\nrequire(38)(Chart);\r\n\r\nrequire(41)(Chart);\r\nrequire(39)(Chart);\r\nrequire(40)(Chart);\r\nrequire(42)(Chart);\r\nrequire(43)(Chart);\r\nrequire(44)(Chart);\r\n\r\n// Controllers must be loaded after elements\r\n// See Chart.core.datasetController.dataElementType\r\nrequire(15)(Chart);\r\nrequire(16)(Chart);\r\nrequire(17)(Chart);\r\nrequire(18)(Chart);\r\nrequire(19)(Chart);\r\nrequire(20)(Chart);\r\n\r\nrequire(8)(Chart);\r\nrequire(9)(Chart);\r\nrequire(10)(Chart);\r\nrequire(11)(Chart);\r\nrequire(12)(Chart);\r\nrequire(13)(Chart);\r\nrequire(14)(Chart);\r\n\r\nwindow.Chart = module.exports = Chart;\r\n\r\n},{\"10\":10,\"11\":11,\"12\":12,\"13\":13,\"14\":14,\"15\":15,\"16\":16,\"17\":17,\"18\":18,\"19\":19,\"20\":20,\"21\":21,\"22\":22,\"23\":23,\"24\":24,\"25\":25,\"26\":26,\"27\":27,\"28\":28,\"29\":29,\"30\":30,\"31\":31,\"32\":32,\"33\":33,\"34\":34,\"35\":35,\"36\":36,\"37\":37,\"38\":38,\"39\":39,\"40\":40,\"41\":41,\"42\":42,\"43\":43,\"44\":44,\"8\":8,\"9\":9}],8:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tChart.Bar = function(context, config) {\r\n\t\tconfig.type = 'bar';\r\n\r\n\t\treturn new Chart(context, config);\r\n\t};\r\n\r\n};\r\n},{}],9:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tChart.Bubble = function(context, config) {\r\n\t\tconfig.type = 'bubble';\r\n\t\treturn new Chart(context, config);\r\n\t};\r\n\r\n};\r\n},{}],10:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tChart.Doughnut = function(context, config) {\r\n\t\tconfig.type = 'doughnut';\r\n\r\n\t\treturn new Chart(context, config);\r\n\t};\r\n\r\n};\r\n},{}],11:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tChart.Line = function(context, config) {\r\n\t\tconfig.type = 'line';\r\n\r\n\t\treturn new Chart(context, config);\r\n\t};\r\n\r\n};\r\n},{}],12:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tChart.PolarArea = function(context, config) {\r\n\t\tconfig.type = 'polarArea';\r\n\r\n\t\treturn new Chart(context, config);\r\n\t};\r\n\r\n};\r\n},{}],13:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\t\r\n\tChart.Radar = function(context, config) {\r\n\t\tconfig.options = Chart.helpers.configMerge({ aspectRatio: 1 }, config.options);\r\n\t\tconfig.type = 'radar';\r\n\r\n\t\treturn new Chart(context, config);\r\n\t};\r\n\r\n};\r\n\r\n},{}],14:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar defaultConfig = {\r\n\t\thover: {\r\n\t\t\tmode: 'single'\r\n\t\t},\r\n\r\n\t\tscales: {\r\n\t\t\txAxes: [{\r\n\t\t\t\ttype: \"linear\", // scatter should not use a category axis\r\n\t\t\t\tposition: \"bottom\",\r\n\t\t\t\tid: \"x-axis-1\" // need an ID so datasets can reference the scale\r\n\t\t\t}],\r\n\t\t\tyAxes: [{\r\n\t\t\t\ttype: \"linear\",\r\n\t\t\t\tposition: \"left\",\r\n\t\t\t\tid: \"y-axis-1\"\r\n\t\t\t}]\r\n\t\t},\r\n\r\n\t\ttooltips: {\r\n\t\t\tcallbacks: {\r\n\t\t\t\ttitle: function() {\r\n\t\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\r\n\t\t\t\t\treturn '';\r\n\t\t\t\t},\r\n\t\t\t\tlabel: function(tooltipItem) {\r\n\t\t\t\t\treturn '(' + tooltipItem.xLabel + ', ' + tooltipItem.yLabel + ')';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// Register the default config for this type\r\n\tChart.defaults.scatter = defaultConfig;\r\n\r\n\t// Scatter charts use line controllers\r\n\tChart.controllers.scatter = Chart.controllers.line;\r\n\r\n\tChart.Scatter = function(context, config) {\r\n\t\tconfig.type = 'scatter';\r\n\t\treturn new Chart(context, config);\r\n\t};\r\n\r\n};\r\n},{}],15:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.bar = {\r\n\t\thover: {\r\n\t\t\tmode: \"label\"\r\n\t\t},\r\n\r\n\t\tscales: {\r\n\t\t\txAxes: [{\r\n\t\t\t\ttype: \"category\",\r\n\r\n\t\t\t\t// Specific to Bar Controller\r\n\t\t\t\tcategoryPercentage: 0.8,\r\n\t\t\t\tbarPercentage: 0.9,\r\n\r\n\t\t\t\t// grid line settings\r\n\t\t\t\tgridLines: {\r\n\t\t\t\t\toffsetGridLines: true\r\n\t\t\t\t}\r\n\t\t\t}],\r\n\t\t\tyAxes: [{\r\n\t\t\t\ttype: \"linear\"\r\n\t\t\t}]\r\n\t\t}\r\n\t};\r\n\r\n\tChart.controllers.bar = Chart.DatasetController.extend({\r\n\r\n\t\tdataElementType: Chart.elements.Rectangle,\r\n\r\n\t\tinitialize: function(chart, datasetIndex) {\r\n\t\t\tChart.DatasetController.prototype.initialize.call(this, chart, datasetIndex);\r\n\r\n\t\t\t// Use this to indicate that this is a bar dataset.\r\n\t\t\tthis.getMeta().bar = true;\r\n\t\t},\r\n\r\n\t\t// Get the number of datasets that display bars. We use this to correctly calculate the bar width\r\n\t\tgetBarCount: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar barCount = 0;\r\n\t\t\thelpers.each(me.chart.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tvar meta = me.chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\tif (meta.bar && me.chart.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\t\t++barCount;\r\n\t\t\t\t}\r\n\t\t\t}, me);\r\n\t\t\treturn barCount;\r\n\t\t},\r\n\r\n\t\tupdate: function(reset) {\r\n\t\t\tvar me = this;\r\n\t\t\thelpers.each(me.getMeta().data, function(rectangle, index) {\r\n\t\t\t\tme.updateElement(rectangle, index, reset);\r\n\t\t\t}, me);\r\n\t\t},\r\n\r\n\t\tupdateElement: function(rectangle, index, reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar scaleBase = yScale.getBasePixel();\r\n\t\t\tvar rectangleElementOptions = me.chart.options.elements.rectangle;\r\n\t\t\tvar custom = rectangle.custom || {};\r\n\t\t\tvar dataset = me.getDataset();\r\n\r\n\t\t\thelpers.extend(rectangle, {\r\n\t\t\t\t// Utility\r\n\t\t\t\t_xScale: xScale,\r\n\t\t\t\t_yScale: yScale,\r\n\t\t\t\t_datasetIndex: me.index,\r\n\t\t\t\t_index: index,\r\n\r\n\t\t\t\t// Desired view properties\r\n\t\t\t\t_model: {\r\n\t\t\t\t\tx: me.calculateBarX(index, me.index),\r\n\t\t\t\t\ty: reset ? scaleBase : me.calculateBarY(index, me.index),\r\n\r\n\t\t\t\t\t// Tooltip\r\n\t\t\t\t\tlabel: me.chart.data.labels[index],\r\n\t\t\t\t\tdatasetLabel: dataset.label,\r\n\r\n\t\t\t\t\t// Appearance\r\n\t\t\t\t\tbase: reset ? scaleBase : me.calculateBarBase(me.index, index),\r\n\t\t\t\t\twidth: me.calculateBarWidth(index),\r\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor),\r\n\t\t\t\t\tborderSkipped: custom.borderSkipped ? custom.borderSkipped : rectangleElementOptions.borderSkipped,\r\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor),\r\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth)\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\trectangle.pivot();\r\n\t\t},\r\n\r\n\t\tcalculateBarBase: function(datasetIndex, index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar base = 0;\r\n\r\n\t\t\tif (yScale.options.stacked) {\r\n\t\t\t\tvar chart = me.chart;\r\n\t\t\t\tvar datasets = chart.data.datasets;\r\n\t\t\t\tvar value = Number(datasets[datasetIndex].data[index]);\r\n\r\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\r\n\t\t\t\t\tvar currentDs = datasets[i];\r\n\t\t\t\t\tvar currentDsMeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tif (currentDsMeta.bar && currentDsMeta.yAxisID === yScale.id && chart.isDatasetVisible(i)) {\r\n\t\t\t\t\t\tvar currentVal = Number(currentDs.data[index]);\r\n\t\t\t\t\t\tbase += value < 0 ? Math.min(currentVal, 0) : Math.max(currentVal, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn yScale.getPixelForValue(base);\r\n\t\t\t}\r\n\r\n\t\t\treturn yScale.getBasePixel();\r\n\t\t},\r\n\r\n\t\tgetRuler: function(index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar datasetCount = me.getBarCount();\r\n\r\n\t\t\tvar tickWidth;\r\n\r\n\t\t\tif (xScale.options.type === 'category') {\r\n\t\t\t\ttickWidth = xScale.getPixelForTick(index + 1) - xScale.getPixelForTick(index);\r\n\t\t\t} else {\r\n\t\t\t\t// Average width\r\n\t\t\t\ttickWidth = xScale.width / xScale.ticks.length;\r\n\t\t\t}\r\n\t\t\tvar categoryWidth = tickWidth * xScale.options.categoryPercentage;\r\n\t\t\tvar categorySpacing = (tickWidth - (tickWidth * xScale.options.categoryPercentage)) / 2;\r\n\t\t\tvar fullBarWidth = categoryWidth / datasetCount;\r\n\r\n\t\t\tif (xScale.ticks.length !== me.chart.data.labels.length) {\r\n\t\t\t    var perc = xScale.ticks.length / me.chart.data.labels.length;\r\n\t\t\t    fullBarWidth = fullBarWidth * perc;\r\n\t\t\t}\r\n\r\n\t\t\tvar barWidth = fullBarWidth * xScale.options.barPercentage;\r\n\t\t\tvar barSpacing = fullBarWidth - (fullBarWidth * xScale.options.barPercentage);\r\n\r\n\t\t\treturn {\r\n\t\t\t\tdatasetCount: datasetCount,\r\n\t\t\t\ttickWidth: tickWidth,\r\n\t\t\t\tcategoryWidth: categoryWidth,\r\n\t\t\t\tcategorySpacing: categorySpacing,\r\n\t\t\t\tfullBarWidth: fullBarWidth,\r\n\t\t\t\tbarWidth: barWidth,\r\n\t\t\t\tbarSpacing: barSpacing\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\tcalculateBarWidth: function(index) {\r\n\t\t\tvar xScale = this.getScaleForId(this.getMeta().xAxisID);\r\n\t\t\tif (xScale.options.barThickness) {\r\n\t\t\t\treturn xScale.options.barThickness;\r\n\t\t\t}\r\n\t\t\tvar ruler = this.getRuler(index);\r\n\t\t\treturn xScale.options.stacked ? ruler.categoryWidth : ruler.barWidth;\r\n\t\t},\r\n\r\n\t\t// Get bar index from the given dataset index accounting for the fact that not all bars are visible\r\n\t\tgetBarIndex: function(datasetIndex) {\r\n\t\t\tvar barIndex = 0;\r\n\t\t\tvar meta, j;\r\n\r\n\t\t\tfor (j = 0; j < datasetIndex; ++j) {\r\n\t\t\t\tmeta = this.chart.getDatasetMeta(j);\r\n\t\t\t\tif (meta.bar && this.chart.isDatasetVisible(j)) {\r\n\t\t\t\t\t++barIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn barIndex;\r\n\t\t},\r\n\r\n\t\tcalculateBarX: function(index, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar barIndex = me.getBarIndex(datasetIndex);\r\n\r\n\t\t\tvar ruler = me.getRuler(index);\r\n\t\t\tvar leftTick = xScale.getPixelForValue(null, index, datasetIndex, me.chart.isCombo);\r\n\t\t\tleftTick -= me.chart.isCombo ? (ruler.tickWidth / 2) : 0;\r\n\r\n\t\t\tif (xScale.options.stacked) {\r\n\t\t\t\treturn leftTick + (ruler.categoryWidth / 2) + ruler.categorySpacing;\r\n\t\t\t}\r\n\r\n\t\t\treturn leftTick +\r\n\t\t\t\t(ruler.barWidth / 2) +\r\n\t\t\t\truler.categorySpacing +\r\n\t\t\t\t(ruler.barWidth * barIndex) +\r\n\t\t\t\t(ruler.barSpacing / 2) +\r\n\t\t\t\t(ruler.barSpacing * barIndex);\r\n\t\t},\r\n\r\n\t\tcalculateBarY: function(index, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar value = Number(me.getDataset().data[index]);\r\n\r\n\t\t\tif (yScale.options.stacked) {\r\n\r\n\t\t\t\tvar sumPos = 0,\r\n\t\t\t\t\tsumNeg = 0;\r\n\r\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\r\n\t\t\t\t\tvar ds = me.chart.data.datasets[i];\r\n\t\t\t\t\tvar dsMeta = me.chart.getDatasetMeta(i);\r\n\t\t\t\t\tif (dsMeta.bar && dsMeta.yAxisID === yScale.id && me.chart.isDatasetVisible(i)) {\r\n\t\t\t\t\t\tvar stackedVal = Number(ds.data[index]);\r\n\t\t\t\t\t\tif (stackedVal < 0) {\r\n\t\t\t\t\t\t\tsumNeg += stackedVal || 0;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tsumPos += stackedVal || 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (value < 0) {\r\n\t\t\t\t\treturn yScale.getPixelForValue(sumNeg + value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn yScale.getPixelForValue(sumPos + value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn yScale.getPixelForValue(value);\r\n\t\t},\r\n\r\n\t\tdraw: function(ease) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar easingDecimal = ease || 1;\r\n\t\t\thelpers.each(me.getMeta().data, function(rectangle, index) {\r\n\t\t\t\tvar d = me.getDataset().data[index];\r\n\t\t\t\tif (d !== null && d !== undefined && !isNaN(d)) {\r\n\t\t\t\t\trectangle.transition(easingDecimal).draw();\r\n\t\t\t\t}\r\n\t\t\t}, me);\r\n\t\t},\r\n\r\n\t\tsetHoverStyle: function(rectangle) {\r\n\t\t\tvar dataset = this.chart.data.datasets[rectangle._datasetIndex];\r\n\t\t\tvar index = rectangle._index;\r\n\r\n\t\t\tvar custom = rectangle.custom || {};\r\n\t\t\tvar model = rectangle._model;\r\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.getValueAtIndexOrDefault(dataset.hoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));\r\n\t\t\tmodel.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.getValueAtIndexOrDefault(dataset.hoverBorderColor, index, helpers.getHoverColor(model.borderColor));\r\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.getValueAtIndexOrDefault(dataset.hoverBorderWidth, index, model.borderWidth);\r\n\t\t},\r\n\r\n\t\tremoveHoverStyle: function(rectangle) {\r\n\t\t\tvar dataset = this.chart.data.datasets[rectangle._datasetIndex];\r\n\t\t\tvar index = rectangle._index;\r\n\t\t\tvar custom = rectangle.custom || {};\r\n\t\t\tvar model = rectangle._model;\r\n\t\t\tvar rectangleElementOptions = this.chart.options.elements.rectangle;\r\n\r\n\t\t\tmodel.backgroundColor = custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor);\r\n\t\t\tmodel.borderColor = custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor);\r\n\t\t\tmodel.borderWidth = custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\r\n\t// including horizontalBar in the bar file, instead of a file of its own\r\n\t// it extends bar (like pie extends doughnut)\r\n\tChart.defaults.horizontalBar = {\r\n\t\thover: {\r\n\t\t\tmode: \"label\"\r\n\t\t},\r\n\r\n\t\tscales: {\r\n\t\t\txAxes: [{\r\n\t\t\t\ttype: \"linear\",\r\n\t\t\t\tposition: \"bottom\"\r\n\t\t\t}],\r\n\t\t\tyAxes: [{\r\n\t\t\t\tposition: \"left\",\r\n\t\t\t\ttype: \"category\",\r\n\r\n\t\t\t\t// Specific to Horizontal Bar Controller\r\n\t\t\t\tcategoryPercentage: 0.8,\r\n\t\t\t\tbarPercentage: 0.9,\r\n\r\n\t\t\t\t// grid line settings\r\n\t\t\t\tgridLines: {\r\n\t\t\t\t\toffsetGridLines: true\r\n\t\t\t\t}\r\n\t\t\t}]\r\n\t\t},\r\n\t\telements: {\r\n\t\t\trectangle: {\r\n\t\t\t\tborderSkipped: 'left'\r\n\t\t\t}\r\n\t\t},\r\n\t\ttooltips: {\r\n\t\t\tcallbacks: {\r\n\t\t\t\ttitle: function(tooltipItems, data) {\r\n\t\t\t\t\t// Pick first xLabel for now\r\n\t\t\t\t\tvar title = '';\r\n\r\n\t\t\t\t\tif (tooltipItems.length > 0) {\r\n\t\t\t\t\t\tif (tooltipItems[0].yLabel) {\r\n\t\t\t\t\t\t\ttitle = tooltipItems[0].yLabel;\r\n\t\t\t\t\t\t} else if (data.labels.length > 0 && tooltipItems[0].index < data.labels.length) {\r\n\t\t\t\t\t\t\ttitle = data.labels[tooltipItems[0].index];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn title;\r\n\t\t\t\t},\r\n\t\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\t\tvar datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';\r\n\t\t\t\treturn datasetLabel + ': ' + tooltipItem.xLabel;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tChart.controllers.horizontalBar = Chart.controllers.bar.extend({\r\n\t\tupdateElement: function(rectangle, index, reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar scaleBase = xScale.getBasePixel();\r\n\t\t\tvar custom = rectangle.custom || {};\r\n\t\t\tvar dataset = me.getDataset();\r\n\t\t\tvar rectangleElementOptions = me.chart.options.elements.rectangle;\r\n\r\n\t\t\thelpers.extend(rectangle, {\r\n\t\t\t\t// Utility\r\n\t\t\t\t_xScale: xScale,\r\n\t\t\t\t_yScale: yScale,\r\n\t\t\t\t_datasetIndex: me.index,\r\n\t\t\t\t_index: index,\r\n\r\n\t\t\t\t// Desired view properties\r\n\t\t\t\t_model: {\r\n\t\t\t\t\tx: reset ? scaleBase : me.calculateBarX(index, me.index),\r\n\t\t\t\t\ty: me.calculateBarY(index, me.index),\r\n\r\n\t\t\t\t\t// Tooltip\r\n\t\t\t\t\tlabel: me.chart.data.labels[index],\r\n\t\t\t\t\tdatasetLabel: dataset.label,\r\n\r\n\t\t\t\t\t// Appearance\r\n\t\t\t\t\tbase: reset ? scaleBase : me.calculateBarBase(me.index, index),\r\n\t\t\t\t\theight: me.calculateBarHeight(index),\r\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor),\r\n\t\t\t\t\tborderSkipped: custom.borderSkipped ? custom.borderSkipped : rectangleElementOptions.borderSkipped,\r\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor),\r\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth)\r\n\t\t\t\t},\r\n\r\n\t\t\t\tdraw: function () {\r\n\t\t\t\t\tvar ctx = this._chart.ctx;\r\n\t\t\t\t\tvar vm = this._view;\r\n\r\n\t\t\t\t\tvar halfHeight = vm.height / 2,\r\n\t\t\t\t\t\ttopY = vm.y - halfHeight,\r\n\t\t\t\t\t\tbottomY = vm.y + halfHeight,\r\n\t\t\t\t\t\tright = vm.base - (vm.base - vm.x),\r\n\t\t\t\t\t\thalfStroke = vm.borderWidth / 2;\r\n\r\n\t\t\t\t\t// Canvas doesn't allow us to stroke inside the width so we can\r\n\t\t\t\t\t// adjust the sizes to fit if we're setting a stroke on the line\r\n\t\t\t\t\tif (vm.borderWidth) {\r\n\t\t\t\t\t\ttopY += halfStroke;\r\n\t\t\t\t\t\tbottomY -= halfStroke;\r\n\t\t\t\t\t\tright += halfStroke;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tctx.beginPath();\r\n\r\n\t\t\t\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\t\t\t\tctx.strokeStyle = vm.borderColor;\r\n\t\t\t\t\tctx.lineWidth = vm.borderWidth;\r\n\r\n\t\t\t\t\t// Corner points, from bottom-left to bottom-right clockwise\r\n\t\t\t\t\t// | 1 2 |\r\n\t\t\t\t\t// | 0 3 |\r\n\t\t\t\t\tvar corners = [\r\n\t\t\t\t\t\t[vm.base, bottomY],\r\n\t\t\t\t\t\t[vm.base, topY],\r\n\t\t\t\t\t\t[right, topY],\r\n\t\t\t\t\t\t[right, bottomY]\r\n\t\t\t\t\t];\r\n\r\n\t\t\t\t\t// Find first (starting) corner with fallback to 'bottom'\r\n\t\t\t\t\tvar borders = ['bottom', 'left', 'top', 'right'];\r\n\t\t\t\t\tvar startCorner = borders.indexOf(vm.borderSkipped, 0);\r\n\t\t\t\t\tif (startCorner === -1)\r\n\t\t\t\t\t\tstartCorner = 0;\r\n\r\n\t\t\t\t\tfunction cornerAt(index) {\r\n\t\t\t\t\t\treturn corners[(startCorner + index) % 4];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Draw rectangle from 'startCorner'\r\n\t\t\t\t\tctx.moveTo.apply(ctx, cornerAt(0));\r\n\t\t\t\t\tfor (var i = 1; i < 4; i++)\r\n\t\t\t\t\t\tctx.lineTo.apply(ctx, cornerAt(i));\r\n\r\n\t\t\t\t\tctx.fill();\r\n\t\t\t\t\tif (vm.borderWidth) {\r\n\t\t\t\t\t\tctx.stroke();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tinRange: function (mouseX, mouseY) {\r\n\t\t\t\t\tvar vm = this._view;\r\n\t\t\t\t\tvar inRange = false;\r\n\r\n\t\t\t\t\tif (vm) {\r\n\t\t\t\t\t\tif (vm.x < vm.base) {\r\n\t\t\t\t\t\t\tinRange = (mouseY >= vm.y - vm.height / 2 && mouseY <= vm.y + vm.height / 2) && (mouseX >= vm.x && mouseX <= vm.base);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tinRange = (mouseY >= vm.y - vm.height / 2 && mouseY <= vm.y + vm.height / 2) && (mouseX >= vm.base && mouseX <= vm.x);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn inRange;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\trectangle.pivot();\r\n\t\t},\r\n\r\n\t\tcalculateBarBase: function (datasetIndex, index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar base = 0;\r\n\r\n\t\t\tif (xScale.options.stacked) {\r\n\t\t\t\tvar chart = me.chart;\r\n\t\t\t\tvar datasets = chart.data.datasets;\r\n\t\t\t\tvar value = Number(datasets[datasetIndex].data[index]);\r\n\r\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\r\n\t\t\t\t\tvar currentDs = datasets[i];\r\n\t\t\t\t\tvar currentDsMeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tif (currentDsMeta.bar && currentDsMeta.xAxisID === xScale.id && chart.isDatasetVisible(i)) {\r\n\t\t\t\t\t\tvar currentVal = Number(currentDs.data[index]);\r\n\t\t\t\t\t\tbase += value < 0 ? Math.min(currentVal, 0) : Math.max(currentVal, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn xScale.getPixelForValue(base);\r\n\t\t\t}\r\n\r\n\t\t\treturn xScale.getBasePixel();\r\n\t\t},\r\n\r\n\t\tgetRuler: function (index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar datasetCount = me.getBarCount();\r\n\r\n\t\t\tvar tickHeight;\r\n\t\t\tif (yScale.options.type === 'category') {\r\n\t\t\t\ttickHeight = yScale.getPixelForTick(index + 1) - yScale.getPixelForTick(index);\r\n\t\t\t} else {\r\n\t\t\t\t// Average width\r\n\t\t\t\ttickHeight = yScale.width / yScale.ticks.length;\r\n\t\t\t}\r\n\t\t\tvar categoryHeight = tickHeight * yScale.options.categoryPercentage;\r\n\t\t\tvar categorySpacing = (tickHeight - (tickHeight * yScale.options.categoryPercentage)) / 2;\r\n\t\t\tvar fullBarHeight = categoryHeight / datasetCount;\r\n\r\n\t\t\tif (yScale.ticks.length !== me.chart.data.labels.length) {\r\n\t\t\t\tvar perc = yScale.ticks.length / me.chart.data.labels.length;\r\n\t\t\t\tfullBarHeight = fullBarHeight * perc;\r\n\t\t\t}\r\n\r\n\t\t\tvar barHeight = fullBarHeight * yScale.options.barPercentage;\r\n\t\t\tvar barSpacing = fullBarHeight - (fullBarHeight * yScale.options.barPercentage);\r\n\r\n\t\t\treturn {\r\n\t\t\t\tdatasetCount: datasetCount,\r\n\t\t\t\ttickHeight: tickHeight,\r\n\t\t\t\tcategoryHeight: categoryHeight,\r\n\t\t\t\tcategorySpacing: categorySpacing,\r\n\t\t\t\tfullBarHeight: fullBarHeight,\r\n\t\t\t\tbarHeight: barHeight,\r\n\t\t\t\tbarSpacing: barSpacing\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\tcalculateBarHeight: function (index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar yScale = me.getScaleForId(me.getMeta().yAxisID);\r\n\t\t\tif (yScale.options.barThickness) {\r\n\t\t\t\treturn yScale.options.barThickness;\r\n\t\t\t}\r\n\t\t\tvar ruler = me.getRuler(index);\r\n\t\t\treturn yScale.options.stacked ? ruler.categoryHeight : ruler.barHeight;\r\n\t\t},\r\n\r\n\t\tcalculateBarX: function (index, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar value = Number(me.getDataset().data[index]);\r\n\r\n\t\t\tif (xScale.options.stacked) {\r\n\r\n\t\t\t\tvar sumPos = 0,\r\n\t\t\t\t\tsumNeg = 0;\r\n\r\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\r\n\t\t\t\t\tvar ds = me.chart.data.datasets[i];\r\n\t\t\t\t\tvar dsMeta = me.chart.getDatasetMeta(i);\r\n\t\t\t\t\tif (dsMeta.bar && dsMeta.xAxisID === xScale.id && me.chart.isDatasetVisible(i)) {\r\n\t\t\t\t\t\tvar stackedVal = Number(ds.data[index]);\r\n\t\t\t\t\t\tif (stackedVal < 0) {\r\n\t\t\t\t\t\t\tsumNeg += stackedVal || 0;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tsumPos += stackedVal || 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (value < 0) {\r\n\t\t\t\t\treturn xScale.getPixelForValue(sumNeg + value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn xScale.getPixelForValue(sumPos + value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn xScale.getPixelForValue(value);\r\n\t\t},\r\n\r\n\t\tcalculateBarY: function (index, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar barIndex = me.getBarIndex(datasetIndex);\r\n\r\n\t\t\tvar ruler = me.getRuler(index);\r\n\t\t\tvar topTick = yScale.getPixelForValue(null, index, datasetIndex, me.chart.isCombo);\r\n\t\t\ttopTick -= me.chart.isCombo ? (ruler.tickHeight / 2) : 0;\r\n\r\n\t\t\tif (yScale.options.stacked) {\r\n\t\t\t\treturn topTick + (ruler.categoryHeight / 2) + ruler.categorySpacing;\r\n\t\t\t}\r\n\r\n\t\t\treturn topTick +\r\n\t\t\t\t(ruler.barHeight / 2) +\r\n\t\t\t\truler.categorySpacing +\r\n\t\t\t\t(ruler.barHeight * barIndex) +\r\n\t\t\t\t(ruler.barSpacing / 2) +\r\n\t\t\t\t(ruler.barSpacing * barIndex);\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],16:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.bubble = {\r\n\t\thover: {\r\n\t\t\tmode: \"single\"\r\n\t\t},\r\n\r\n\t\tscales: {\r\n\t\t\txAxes: [{\r\n\t\t\t\ttype: \"linear\", // bubble should probably use a linear scale by default\r\n\t\t\t\tposition: \"bottom\",\r\n\t\t\t\tid: \"x-axis-0\" // need an ID so datasets can reference the scale\r\n\t\t\t}],\r\n\t\t\tyAxes: [{\r\n\t\t\t\ttype: \"linear\",\r\n\t\t\t\tposition: \"left\",\r\n\t\t\t\tid: \"y-axis-0\"\r\n\t\t\t}]\r\n\t\t},\r\n\r\n\t\ttooltips: {\r\n\t\t\tcallbacks: {\r\n\t\t\t\ttitle: function() {\r\n\t\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\r\n\t\t\t\t\treturn '';\r\n\t\t\t\t},\r\n\t\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\t\tvar datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';\r\n\t\t\t\t\tvar dataPoint = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n\t\t\t\t\treturn datasetLabel + ': (' + dataPoint.x + ', ' + dataPoint.y + ', ' + dataPoint.r + ')';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tChart.controllers.bubble = Chart.DatasetController.extend({\r\n\r\n\t\tdataElementType: Chart.elements.Point,\r\n\r\n\t\tupdate: function(reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar points = meta.data;\r\n\r\n\t\t\t// Update Points\r\n\t\t\thelpers.each(points, function(point, index) {\r\n\t\t\t\tme.updateElement(point, index, reset);\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tupdateElement: function(point, index, reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar dataset = me.getDataset();\r\n\t\t\tvar data = dataset.data[index];\r\n\t\t\tvar pointElementOptions = me.chart.options.elements.point;\r\n\t\t\tvar dsIndex = me.index;\r\n\r\n\t\t\thelpers.extend(point, {\r\n\t\t\t\t// Utility\r\n\t\t\t\t_xScale: xScale,\r\n\t\t\t\t_yScale: yScale,\r\n\t\t\t\t_datasetIndex: dsIndex,\r\n\t\t\t\t_index: index,\r\n\r\n\t\t\t\t// Desired view properties\r\n\t\t\t\t_model: {\r\n\t\t\t\t\tx: reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex, me.chart.isCombo),\r\n\t\t\t\t\ty: reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex),\r\n\t\t\t\t\t// Appearance\r\n\t\t\t\t\tradius: reset ? 0 : custom.radius ? custom.radius : me.getRadius(data),\r\n\r\n\t\t\t\t\t// Tooltip\r\n\t\t\t\t\thitRadius: custom.hitRadius ? custom.hitRadius : helpers.getValueAtIndexOrDefault(dataset.hitRadius, index, pointElementOptions.hitRadius)\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Trick to reset the styles of the point\r\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(me, point, pointElementOptions);\r\n\r\n\t\t\tvar model = point._model;\r\n\t\t\tmodel.skip = custom.skip ? custom.skip : (isNaN(model.x) || isNaN(model.y));\r\n\r\n\t\t\tpoint.pivot();\r\n\t\t},\r\n\r\n\t\tgetRadius: function(value) {\r\n\t\t\treturn value.r || this.chart.options.elements.point.radius;\r\n\t\t},\r\n\r\n\t\tsetHoverStyle: function(point) {\r\n\t\t\tvar me = this;\r\n\t\t\tChart.DatasetController.prototype.setHoverStyle.call(me, point);\r\n\r\n\t\t\t// Radius\r\n\t\t\tvar dataset = me.chart.data.datasets[point._datasetIndex];\r\n\t\t\tvar index = point._index;\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar model = point._model;\r\n\t\t\tmodel.radius = custom.hoverRadius ? custom.hoverRadius : (helpers.getValueAtIndexOrDefault(dataset.hoverRadius, index, me.chart.options.elements.point.hoverRadius)) + me.getRadius(dataset.data[index]);\r\n\t\t},\r\n\r\n\t\tremoveHoverStyle: function(point) {\r\n\t\t\tvar me = this;\r\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(me, point, me.chart.options.elements.point);\r\n\r\n\t\t\tvar dataVal = me.chart.data.datasets[point._datasetIndex].data[point._index];\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar model = point._model;\r\n\r\n\t\t\tmodel.radius = custom.radius ? custom.radius : me.getRadius(dataVal);\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],17:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers,\r\n\t\tdefaults = Chart.defaults;\r\n\r\n\tdefaults.doughnut = {\r\n\t\tanimation: {\r\n\t\t\t//Boolean - Whether we animate the rotation of the Doughnut\r\n\t\t\tanimateRotate: true,\r\n\t\t\t//Boolean - Whether we animate scaling the Doughnut from the centre\r\n\t\t\tanimateScale: false\r\n\t\t},\r\n\t\taspectRatio: 1,\r\n\t\thover: {\r\n\t\t\tmode: 'single'\r\n\t\t},\r\n\t\tlegendCallback: function(chart) {\r\n\t\t\tvar text = [];\r\n\t\t\ttext.push('<ul class=\"' + chart.id + '-legend\">');\r\n\r\n\t\t\tvar data = chart.data;\r\n\t\t\tvar datasets = data.datasets;\r\n\t\t\tvar labels = data.labels;\r\n\r\n\t\t\tif (datasets.length) {\r\n\t\t\t\tfor (var i = 0; i < datasets[0].data.length; ++i) {\r\n\t\t\t\t\ttext.push('<li><span style=\"background-color:' + datasets[0].backgroundColor[i] + '\"></span>');\r\n\t\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\t\ttext.push(labels[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttext.push('</li>');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ttext.push('</ul>');\r\n\t\t\treturn text.join(\"\");\r\n\t\t},\r\n\t\tlegend: {\r\n\t\t\tlabels: {\r\n\t\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\t\tvar data = chart.data;\r\n\t\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\t\tvar ds = data.datasets[0];\r\n\t\t\t\t\t\t\tvar arc = meta.data[i];\r\n\t\t\t\t\t\t\tvar custom = arc && arc.custom || {};\r\n\t\t\t\t\t\t\tvar getValueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\r\n\t\t\t\t\t\t\tvar arcOpts = chart.options.elements.arc;\r\n\t\t\t\t\t\t\tvar fill = custom.backgroundColor ? custom.backgroundColor : getValueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor);\r\n\t\t\t\t\t\t\tvar stroke = custom.borderColor ? custom.borderColor : getValueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor);\r\n\t\t\t\t\t\t\tvar bw = custom.borderWidth ? custom.borderWidth : getValueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth);\r\n\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\t\tfillStyle: fill,\r\n\t\t\t\t\t\t\t\tstrokeStyle: stroke,\r\n\t\t\t\t\t\t\t\tlineWidth: bw,\r\n\t\t\t\t\t\t\t\thidden: isNaN(ds.data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tonClick: function(e, legendItem) {\r\n\t\t\t\tvar index = legendItem.index;\r\n\t\t\t\tvar chart = this.chart;\r\n\t\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tchart.update();\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t//The percentage of the chart that we cut out of the middle.\r\n\t\tcutoutPercentage: 50,\r\n\r\n\t\t//The rotation of the chart, where the first data arc begins.\r\n\t\trotation: Math.PI * -0.5,\r\n\r\n\t\t//The total circumference of the chart.\r\n\t\tcircumference: Math.PI * 2.0,\r\n\r\n\t\t// Need to override these to give a nice default\r\n\t\ttooltips: {\r\n\t\t\tcallbacks: {\r\n\t\t\t\ttitle: function() {\r\n\t\t\t\t\treturn '';\r\n\t\t\t\t},\r\n\t\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\t\treturn data.labels[tooltipItem.index] + ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tdefaults.pie = helpers.clone(defaults.doughnut);\r\n\thelpers.extend(defaults.pie, {\r\n\t\tcutoutPercentage: 0\r\n\t});\r\n\r\n\r\n\tChart.controllers.doughnut = Chart.controllers.pie = Chart.DatasetController.extend({\r\n\r\n\t\tdataElementType: Chart.elements.Arc,\r\n\r\n\t\tlinkScales: helpers.noop,\r\n\r\n\t\t// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\r\n\t\tgetRingIndex: function(datasetIndex) {\r\n\t\t\tvar ringIndex = 0;\r\n\r\n\t\t\tfor (var j = 0; j < datasetIndex; ++j) {\r\n\t\t\t\tif (this.chart.isDatasetVisible(j)) {\r\n\t\t\t\t\t++ringIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn ringIndex;\r\n\t\t},\r\n\r\n\t\tupdate: function(reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar chart = me.chart,\r\n\t\t\t\tchartArea = chart.chartArea,\r\n\t\t\t\topts = chart.options,\r\n\t\t\t\tarcOpts = opts.elements.arc,\r\n\t\t\t\tavailableWidth = chartArea.right - chartArea.left - arcOpts.borderWidth,\r\n\t\t\t\tavailableHeight = chartArea.bottom - chartArea.top - arcOpts.borderWidth,\r\n\t\t\t\tminSize = Math.min(availableWidth, availableHeight),\r\n\t\t\t\toffset = {\r\n\t\t\t\t\tx: 0,\r\n\t\t\t\t\ty: 0\r\n\t\t\t\t},\r\n\t\t\t\tmeta = me.getMeta(),\r\n\t\t\t\tcutoutPercentage = opts.cutoutPercentage,\r\n\t\t\t\tcircumference = opts.circumference;\r\n\r\n\t\t\t// If the chart's circumference isn't a full circle, calculate minSize as a ratio of the width/height of the arc\r\n\t\t\tif (circumference < Math.PI * 2.0) {\r\n\t\t\t\tvar startAngle = opts.rotation % (Math.PI * 2.0);\r\n\t\t\t\tstartAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0);\r\n\t\t\t\tvar endAngle = startAngle + circumference;\r\n\t\t\t\tvar start = {x: Math.cos(startAngle), y: Math.sin(startAngle)};\r\n\t\t\t\tvar end = {x: Math.cos(endAngle), y: Math.sin(endAngle)};\r\n\t\t\t\tvar contains0 = (startAngle <= 0 && 0 <= endAngle) || (startAngle <= Math.PI * 2.0 && Math.PI * 2.0 <= endAngle);\r\n\t\t\t\tvar contains90 = (startAngle <= Math.PI * 0.5 && Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 2.5 && Math.PI * 2.5 <= endAngle);\r\n\t\t\t\tvar contains180 = (startAngle <= -Math.PI && -Math.PI <= endAngle) || (startAngle <= Math.PI && Math.PI <= endAngle);\r\n\t\t\t\tvar contains270 = (startAngle <= -Math.PI * 0.5 && -Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 1.5 && Math.PI * 1.5 <= endAngle);\r\n\t\t\t\tvar cutout = cutoutPercentage / 100.0;\r\n\t\t\t\tvar min = {x: contains180 ? -1 : Math.min(start.x * (start.x < 0 ? 1 : cutout), end.x * (end.x < 0 ? 1 : cutout)), y: contains270 ? -1 : Math.min(start.y * (start.y < 0 ? 1 : cutout), end.y * (end.y < 0 ? 1 : cutout))};\r\n\t\t\t\tvar max = {x: contains0 ? 1 : Math.max(start.x * (start.x > 0 ? 1 : cutout), end.x * (end.x > 0 ? 1 : cutout)), y: contains90 ? 1 : Math.max(start.y * (start.y > 0 ? 1 : cutout), end.y * (end.y > 0 ? 1 : cutout))};\r\n\t\t\t\tvar size = {width: (max.x - min.x) * 0.5, height: (max.y - min.y) * 0.5};\r\n\t\t\t\tminSize = Math.min(availableWidth / size.width, availableHeight / size.height);\r\n\t\t\t\toffset = {x: (max.x + min.x) * -0.5, y: (max.y + min.y) * -0.5};\r\n\t\t\t}\r\n            chart.borderWidth = me.getMaxBorderWidth(meta.data);\r\n\r\n\t\t\tchart.outerRadius = Math.max((minSize - chart.borderWidth) / 2, 0);\r\n\t\t\tchart.innerRadius = Math.max(cutoutPercentage ? (chart.outerRadius / 100) * (cutoutPercentage) : 1, 0);\r\n\t\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\r\n\t\t\tchart.offsetX = offset.x * chart.outerRadius;\r\n\t\t\tchart.offsetY = offset.y * chart.outerRadius;\r\n\r\n\t\t\tmeta.total = me.calculateTotal();\r\n\r\n\t\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.getRingIndex(me.index));\r\n\t\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\r\n\r\n\t\t\thelpers.each(meta.data, function(arc, index) {\r\n\t\t\t\tme.updateElement(arc, index, reset);\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tupdateElement: function(arc, index, reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar chart = me.chart,\r\n\t\t\t\tchartArea = chart.chartArea,\r\n\t\t\t\topts = chart.options,\r\n\t\t\t\tanimationOpts = opts.animation,\r\n\t\t\t\tcenterX = (chartArea.left + chartArea.right) / 2,\r\n\t\t\t\tcenterY = (chartArea.top + chartArea.bottom) / 2,\r\n\t\t\t\tstartAngle = opts.rotation, // non reset case handled later\r\n\t\t\t\tendAngle = opts.rotation, // non reset case handled later\r\n\t\t\t\tdataset = me.getDataset(),\r\n\t\t\t\tcircumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / (2.0 * Math.PI)),\r\n\t\t\t\tinnerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius,\r\n\t\t\t\touterRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius,\r\n\t\t\t\tvalueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\r\n\r\n\t\t\thelpers.extend(arc, {\r\n\t\t\t\t// Utility\r\n\t\t\t\t_datasetIndex: me.index,\r\n\t\t\t\t_index: index,\r\n\r\n\t\t\t\t// Desired view properties\r\n\t\t\t\t_model: {\r\n\t\t\t\t\tx: centerX + chart.offsetX,\r\n\t\t\t\t\ty: centerY + chart.offsetY,\r\n\t\t\t\t\tstartAngle: startAngle,\r\n\t\t\t\t\tendAngle: endAngle,\r\n\t\t\t\t\tcircumference: circumference,\r\n\t\t\t\t\touterRadius: outerRadius,\r\n\t\t\t\t\tinnerRadius: innerRadius,\r\n\t\t\t\t\tlabel: valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar model = arc._model;\r\n\t\t\t// Resets the visual styles\r\n\t\t\tthis.removeHoverStyle(arc);\r\n\r\n\t\t\t// Set correct angles if not resetting\r\n\t\t\tif (!reset || !animationOpts.animateRotate) {\r\n\t\t\t\tif (index === 0) {\r\n\t\t\t\t\tmodel.startAngle = opts.rotation;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmodel.startAngle = me.getMeta().data[index - 1]._model.endAngle;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmodel.endAngle = model.startAngle + model.circumference;\r\n\t\t\t}\r\n\r\n\t\t\tarc.pivot();\r\n\t\t},\r\n\r\n\t\tremoveHoverStyle: function(arc) {\r\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);\r\n\t\t},\r\n\r\n\t\tcalculateTotal: function() {\r\n\t\t\tvar dataset = this.getDataset();\r\n\t\t\tvar meta = this.getMeta();\r\n\t\t\tvar total = 0;\r\n\t\t\tvar value;\r\n\r\n\t\t\thelpers.each(meta.data, function(element, index) {\r\n\t\t\t\tvalue = dataset.data[index];\r\n\t\t\t\tif (!isNaN(value) && !element.hidden) {\r\n\t\t\t\t\ttotal += Math.abs(value);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t/*if (total === 0) {\r\n\t\t\t\ttotal = NaN;\r\n\t\t\t}*/\r\n\r\n\t\t\treturn total;\r\n\t\t},\r\n\r\n\t\tcalculateCircumference: function(value) {\r\n\t\t\tvar total = this.getMeta().total;\r\n\t\t\tif (total > 0 && !isNaN(value)) {\r\n\t\t\t\treturn (Math.PI * 2.0) * (value / total);\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\t//gets the max border or hover width to properly scale pie charts\r\n        getMaxBorderWidth: function (elements) {\r\n            var max = 0,\r\n\t\t\t\tindex = this.index,\r\n\t\t\t\tlength = elements.length,\r\n\t\t\t\tborderWidth,\r\n\t\t\t\thoverWidth;\r\n\r\n            for (var i = 0; i < length; i++) {\r\n               \tborderWidth = elements[i]._model ? elements[i]._model.borderWidth : 0;\r\n                hoverWidth = elements[i]._chart ? elements[i]._chart.config.data.datasets[index].hoverBorderWidth : 0;\r\n\t\t\t\t\r\n                max = borderWidth > max ? borderWidth : max;\r\n                max = hoverWidth > max ? hoverWidth : max;\r\n            }\r\n            return max;\r\n        }\r\n\t});\r\n};\r\n\r\n},{}],18:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.line = {\r\n\t\tshowLines: true,\r\n\t\tspanGaps: false,\r\n\r\n\t\thover: {\r\n\t\t\tmode: \"label\"\r\n\t\t},\r\n\r\n\t\tscales: {\r\n\t\t\txAxes: [{\r\n\t\t\t\ttype: \"category\",\r\n\t\t\t\tid: 'x-axis-0'\r\n\t\t\t}],\r\n\t\t\tyAxes: [{\r\n\t\t\t\ttype: \"linear\",\r\n\t\t\t\tid: 'y-axis-0'\r\n\t\t\t}]\r\n\t\t}\r\n\t};\r\n\r\n\tfunction lineEnabled(dataset, options) {\r\n\t\treturn helpers.getValueOrDefault(dataset.showLine, options.showLines);\r\n\t}\r\n\r\n\tChart.controllers.line = Chart.DatasetController.extend({\r\n\r\n\t\tdatasetElementType: Chart.elements.Line,\r\n\r\n\t\tdataElementType: Chart.elements.Point,\r\n\r\n\t\taddElementAndReset: function(index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar options = me.chart.options;\r\n\t\t\tvar meta = me.getMeta();\r\n\r\n\t\t\tChart.DatasetController.prototype.addElementAndReset.call(me, index);\r\n\r\n\t\t\t// Make sure bezier control points are updated\r\n\t\t\tif (lineEnabled(me.getDataset(), options) && meta.dataset._model.tension !== 0) {\r\n\t\t\t\tme.updateBezierControlPoints();\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tupdate: function(reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar line = meta.dataset;\r\n\t\t\tvar points = meta.data || [];\r\n\t\t\tvar options = me.chart.options;\r\n\t\t\tvar lineElementOptions = options.elements.line;\r\n\t\t\tvar scale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar i, ilen, custom;\r\n\t\t\tvar dataset = me.getDataset();\r\n\t\t\tvar showLine = lineEnabled(dataset, options);\r\n\r\n\t\t\t// Update Line\r\n\t\t\tif (showLine) {\r\n\t\t\t\tcustom = line.custom || {};\r\n\r\n\t\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\t\tif ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {\r\n\t\t\t\t\tdataset.lineTension = dataset.tension;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Utility\r\n\t\t\t\tline._scale = scale;\r\n\t\t\t\tline._datasetIndex = me.index;\r\n\t\t\t\t// Data\r\n\t\t\t\tline._children = points;\r\n\t\t\t\t// Model\r\n\t\t\t\tline._model = {\r\n\t\t\t\t\t// Appearance\r\n\t\t\t\t\t// The default behavior of lines is to break at null values, according\r\n\t\t\t\t\t// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\r\n\t\t\t\t\t// This option gives linse the ability to span gaps\r\n\t\t\t\t\tspanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps,\r\n\t\t\t\t\ttension: custom.tension ? custom.tension : helpers.getValueOrDefault(dataset.lineTension, lineElementOptions.tension),\r\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor),\r\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth),\r\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor),\r\n\t\t\t\t\tborderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle),\r\n\t\t\t\t\tborderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash),\r\n\t\t\t\t\tborderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset),\r\n\t\t\t\t\tborderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle),\r\n\t\t\t\t\tfill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill),\r\n\t\t\t\t\tsteppedLine: custom.steppedLine ? custom.steppedLine : helpers.getValueOrDefault(dataset.steppedLine, lineElementOptions.stepped),\r\n\t\t\t\t\tcubicInterpolationMode: custom.cubicInterpolationMode ? custom.cubicInterpolationMode : helpers.getValueOrDefault(dataset.cubicInterpolationMode, lineElementOptions.cubicInterpolationMode),\r\n\t\t\t\t\t// Scale\r\n\t\t\t\t\tscaleTop: scale.top,\r\n\t\t\t\t\tscaleBottom: scale.bottom,\r\n\t\t\t\t\tscaleZero: scale.getBasePixel()\r\n\t\t\t\t};\r\n\r\n\t\t\t\tline.pivot();\r\n\t\t\t}\r\n\r\n\t\t\t// Update Points\r\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\r\n\t\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t\t}\r\n\r\n\t\t\tif (showLine && line._model.tension !== 0) {\r\n\t\t\t\tme.updateBezierControlPoints();\r\n\t\t\t}\r\n\r\n\t\t\t// Now pivot the point for animation\r\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\r\n\t\t\t\tpoints[i].pivot();\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetPointBackgroundColor: function(point, index) {\r\n\t\t\tvar backgroundColor = this.chart.options.elements.point.backgroundColor;\r\n\t\t\tvar dataset = this.getDataset();\r\n\t\t\tvar custom = point.custom || {};\r\n\r\n\t\t\tif (custom.backgroundColor) {\r\n\t\t\t\tbackgroundColor = custom.backgroundColor;\r\n\t\t\t} else if (dataset.pointBackgroundColor) {\r\n\t\t\t\tbackgroundColor = helpers.getValueAtIndexOrDefault(dataset.pointBackgroundColor, index, backgroundColor);\r\n\t\t\t} else if (dataset.backgroundColor) {\r\n\t\t\t\tbackgroundColor = dataset.backgroundColor;\r\n\t\t\t}\r\n\r\n\t\t\treturn backgroundColor;\r\n\t\t},\r\n\r\n\t\tgetPointBorderColor: function(point, index) {\r\n\t\t\tvar borderColor = this.chart.options.elements.point.borderColor;\r\n\t\t\tvar dataset = this.getDataset();\r\n\t\t\tvar custom = point.custom || {};\r\n\r\n\t\t\tif (custom.borderColor) {\r\n\t\t\t\tborderColor = custom.borderColor;\r\n\t\t\t} else if (dataset.pointBorderColor) {\r\n\t\t\t\tborderColor = helpers.getValueAtIndexOrDefault(dataset.pointBorderColor, index, borderColor);\r\n\t\t\t} else if (dataset.borderColor) {\r\n\t\t\t\tborderColor = dataset.borderColor;\r\n\t\t\t}\r\n\r\n\t\t\treturn borderColor;\r\n\t\t},\r\n\r\n\t\tgetPointBorderWidth: function(point, index) {\r\n\t\t\tvar borderWidth = this.chart.options.elements.point.borderWidth;\r\n\t\t\tvar dataset = this.getDataset();\r\n\t\t\tvar custom = point.custom || {};\r\n\r\n\t\t\tif (custom.borderWidth) {\r\n\t\t\t\tborderWidth = custom.borderWidth;\r\n\t\t\t} else if (dataset.pointBorderWidth) {\r\n\t\t\t\tborderWidth = helpers.getValueAtIndexOrDefault(dataset.pointBorderWidth, index, borderWidth);\r\n\t\t\t} else if (dataset.borderWidth) {\r\n\t\t\t\tborderWidth = dataset.borderWidth;\r\n\t\t\t}\r\n\r\n\t\t\treturn borderWidth;\r\n\t\t},\r\n\r\n\t\tupdateElement: function(point, index, reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar dataset = me.getDataset();\r\n\t\t\tvar datasetIndex = me.index;\r\n\t\t\tvar value = dataset.data[index];\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\t\tvar pointOptions = me.chart.options.elements.point;\r\n\t\t\tvar x, y;\r\n\t\t\tvar labels = me.chart.data.labels || [];\r\n\t\t\tvar includeOffset = (labels.length === 1 || dataset.data.length === 1) || me.chart.isCombo;\r\n\r\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\tif ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) {\r\n\t\t\t\tdataset.pointRadius = dataset.radius;\r\n\t\t\t}\r\n\t\t\tif ((dataset.hitRadius !== undefined) && (dataset.pointHitRadius === undefined)) {\r\n\t\t\t\tdataset.pointHitRadius = dataset.hitRadius;\r\n\t\t\t}\r\n\r\n\t\t\tx = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex, includeOffset);\r\n\t\t\ty = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);\r\n\r\n\t\t\t// Utility\r\n\t\t\tpoint._xScale = xScale;\r\n\t\t\tpoint._yScale = yScale;\r\n\t\t\tpoint._datasetIndex = datasetIndex;\r\n\t\t\tpoint._index = index;\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\tpoint._model = {\r\n\t\t\t\tx: x,\r\n\t\t\t\ty: y,\r\n\t\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t\t// Appearance\r\n\t\t\t\tradius: custom.radius || helpers.getValueAtIndexOrDefault(dataset.pointRadius, index, pointOptions.radius),\r\n\t\t\t\tpointStyle: custom.pointStyle || helpers.getValueAtIndexOrDefault(dataset.pointStyle, index, pointOptions.pointStyle),\r\n\t\t\t\tbackgroundColor: me.getPointBackgroundColor(point, index),\r\n\t\t\t\tborderColor: me.getPointBorderColor(point, index),\r\n\t\t\t\tborderWidth: me.getPointBorderWidth(point, index),\r\n\t\t\t\ttension: meta.dataset._model ? meta.dataset._model.tension : 0,\r\n\t\t\t\tsteppedLine: meta.dataset._model ? meta.dataset._model.steppedLine : false,\r\n\t\t\t\t// Tooltip\r\n\t\t\t\thitRadius: custom.hitRadius || helpers.getValueAtIndexOrDefault(dataset.pointHitRadius, index, pointOptions.hitRadius)\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\tcalculatePointY: function(value, index, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar chart = me.chart;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\t\tvar sumPos = 0;\r\n\t\t\tvar sumNeg = 0;\r\n\t\t\tvar i, ds, dsMeta;\r\n\r\n\t\t\tif (yScale.options.stacked) {\r\n\t\t\t\tfor (i = 0; i < datasetIndex; i++) {\r\n\t\t\t\t\tds = chart.data.datasets[i];\r\n\t\t\t\t\tdsMeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tif (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id && chart.isDatasetVisible(i)) {\r\n\t\t\t\t\t\tvar stackedRightValue = Number(yScale.getRightValue(ds.data[index]));\r\n\t\t\t\t\t\tif (stackedRightValue < 0) {\r\n\t\t\t\t\t\t\tsumNeg += stackedRightValue || 0;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tsumPos += stackedRightValue || 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar rightValue = Number(yScale.getRightValue(value));\r\n\t\t\t\tif (rightValue < 0) {\r\n\t\t\t\t\treturn yScale.getPixelForValue(sumNeg + rightValue);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn yScale.getPixelForValue(sumPos + rightValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn yScale.getPixelForValue(value);\r\n\t\t},\r\n\r\n\t\tupdateBezierControlPoints: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar area = me.chart.chartArea;\r\n\r\n\t\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\t\tvar points = (meta.data || []);\r\n\t\t\tif (meta.dataset._model.spanGaps) points = points.filter(function(pt) { return !pt._model.skip; });\r\n\t\t\tvar i, ilen, point, model, controlPoints;\r\n\r\n\t\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t\t}\r\n\r\n\t\t\tif (meta.dataset._model.cubicInterpolationMode == 'monotone') {\r\n\t\t\t\thelpers.splineCurveMonotone(points);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\t\tpoint = points[i];\r\n\t\t\t\t\tmodel = point._model;\r\n\t\t\t\t\tcontrolPoints = helpers.splineCurve(\r\n\t\t\t\t\t\thelpers.previousItem(points, i)._model,\r\n\t\t\t\t\t\tmodel,\r\n\t\t\t\t\t\thelpers.nextItem(points, i)._model,\r\n\t\t\t\t\t\tmeta.dataset._model.tension\r\n\t\t\t\t\t);\r\n\t\t\t\t\tmodel.controlPointPreviousX = controlPoints.previous.x;\r\n\t\t\t\t\tmodel.controlPointPreviousY = controlPoints.previous.y;\r\n\t\t\t\t\tmodel.controlPointNextX = controlPoints.next.x;\r\n\t\t\t\t\tmodel.controlPointNextY = controlPoints.next.y;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (me.chart.options.elements.line.capBezierPoints) {\r\n\t\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\t\tmodel.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\r\n\t\t\t\t\tmodel.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\r\n\t\t\t\t\tmodel.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\r\n\t\t\t\t\tmodel.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tdraw: function(ease) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar points = meta.data || [];\r\n\t\t\tvar easingDecimal = ease || 1;\r\n\t\t\tvar i, ilen;\r\n\r\n\t\t\t// Transition Point Locations\r\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\r\n\t\t\t\tpoints[i].transition(easingDecimal);\r\n\t\t\t}\r\n\r\n\t\t\t// Transition and Draw the line\r\n\t\t\tif (lineEnabled(me.getDataset(), me.chart.options)) {\r\n\t\t\t\tmeta.dataset.transition(easingDecimal).draw();\r\n\t\t\t}\r\n\r\n\t\t\t// Draw the points\r\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\r\n\t\t\t\tpoints[i].draw();\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tsetHoverStyle: function(point) {\r\n\t\t\t// Point\r\n\t\t\tvar dataset = this.chart.data.datasets[point._datasetIndex];\r\n\t\t\tvar index = point._index;\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar model = point._model;\r\n\r\n\t\t\tmodel.radius = custom.hoverRadius || helpers.getValueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius);\r\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor || helpers.getValueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));\r\n\t\t\tmodel.borderColor = custom.hoverBorderColor || helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));\r\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth || helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth);\r\n\t\t},\r\n\r\n\t\tremoveHoverStyle: function(point) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar dataset = me.chart.data.datasets[point._datasetIndex];\r\n\t\t\tvar index = point._index;\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar model = point._model;\r\n\r\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\tif ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) {\r\n\t\t\t\tdataset.pointRadius = dataset.radius;\r\n\t\t\t}\r\n\r\n\t\t\tmodel.radius = custom.radius || helpers.getValueAtIndexOrDefault(dataset.pointRadius, index, me.chart.options.elements.point.radius);\r\n\t\t\tmodel.backgroundColor = me.getPointBackgroundColor(point, index);\r\n\t\t\tmodel.borderColor = me.getPointBorderColor(point, index);\r\n\t\t\tmodel.borderWidth = me.getPointBorderWidth(point, index);\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],19:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.polarArea = {\r\n\r\n\t\tscale: {\r\n\t\t\ttype: \"radialLinear\",\r\n\t\t\tlineArc: true, // so that lines are circular\r\n\t\t\tticks: {\r\n\t\t\t\tbeginAtZero: true\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t//Boolean - Whether to animate the rotation of the chart\r\n\t\tanimation: {\r\n\t\t\tanimateRotate: true,\r\n\t\t\tanimateScale: true\r\n\t\t},\r\n\r\n\t\tstartAngle: -0.5 * Math.PI,\r\n\t\taspectRatio: 1,\r\n\t\tlegendCallback: function(chart) {\r\n\t\t\tvar text = [];\r\n\t\t\ttext.push('<ul class=\"' + chart.id + '-legend\">');\r\n\r\n\t\t\tvar data = chart.data;\r\n\t\t\tvar datasets = data.datasets;\r\n\t\t\tvar labels = data.labels;\r\n\r\n\t\t\tif (datasets.length) {\r\n\t\t\t\tfor (var i = 0; i < datasets[0].data.length; ++i) {\r\n\t\t\t\t\ttext.push('<li><span style=\"background-color:' + datasets[0].backgroundColor[i] + '\">');\r\n\t\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\t\ttext.push(labels[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttext.push('</span></li>');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ttext.push('</ul>');\r\n\t\t\treturn text.join(\"\");\r\n\t\t},\r\n\t\tlegend: {\r\n\t\t\tlabels: {\r\n\t\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\t\tvar data = chart.data;\r\n\t\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\t\tvar ds = data.datasets[0];\r\n\t\t\t\t\t\t\tvar arc = meta.data[i];\r\n\t\t\t\t\t\t\tvar custom = arc.custom || {};\r\n\t\t\t\t\t\t\tvar getValueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\r\n\t\t\t\t\t\t\tvar arcOpts = chart.options.elements.arc;\r\n\t\t\t\t\t\t\tvar fill = custom.backgroundColor ? custom.backgroundColor : getValueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor);\r\n\t\t\t\t\t\t\tvar stroke = custom.borderColor ? custom.borderColor : getValueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor);\r\n\t\t\t\t\t\t\tvar bw = custom.borderWidth ? custom.borderWidth : getValueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth);\r\n\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\t\tfillStyle: fill,\r\n\t\t\t\t\t\t\t\tstrokeStyle: stroke,\r\n\t\t\t\t\t\t\t\tlineWidth: bw,\r\n\t\t\t\t\t\t\t\thidden: isNaN(ds.data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tonClick: function(e, legendItem) {\r\n\t\t\t\tvar index = legendItem.index;\r\n\t\t\t\tvar chart = this.chart;\r\n\t\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tchart.update();\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// Need to override these to give a nice default\r\n\t\ttooltips: {\r\n\t\t\tcallbacks: {\r\n\t\t\t\ttitle: function() {\r\n\t\t\t\t\treturn '';\r\n\t\t\t\t},\r\n\t\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\t\treturn data.labels[tooltipItem.index] + ': ' + tooltipItem.yLabel;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tChart.controllers.polarArea = Chart.DatasetController.extend({\r\n\r\n\t\tdataElementType: Chart.elements.Arc,\r\n\r\n\t\tlinkScales: helpers.noop,\r\n\r\n\t\tupdate: function(reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar chart = me.chart;\r\n\t\t\tvar chartArea = chart.chartArea;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar opts = chart.options;\r\n\t\t\tvar arcOpts = opts.elements.arc;\r\n\t\t\tvar minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\r\n\t\t\tchart.outerRadius = Math.max((minSize - arcOpts.borderWidth / 2) / 2, 0);\r\n\t\t\tchart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\r\n\t\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\r\n\r\n\t\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);\r\n\t\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\r\n\r\n\t\t\tmeta.count = me.countVisibleElements();\r\n\r\n\t\t\thelpers.each(meta.data, function(arc, index) {\r\n\t\t\t\tme.updateElement(arc, index, reset);\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tupdateElement: function(arc, index, reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar chart = me.chart;\r\n\t\t\tvar dataset = me.getDataset();\r\n\t\t\tvar opts = chart.options;\r\n\t\t\tvar animationOpts = opts.animation;\r\n\t\t\tvar scale = chart.scale;\r\n\t\t\tvar getValueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\r\n\t\t\tvar labels = chart.data.labels;\r\n\r\n\t\t\tvar circumference = me.calculateCircumference(dataset.data[index]);\r\n\t\t\tvar centerX = scale.xCenter;\r\n\t\t\tvar centerY = scale.yCenter;\r\n\r\n\t\t\t// If there is NaN data before us, we need to calculate the starting angle correctly.\r\n\t\t\t// We could be way more efficient here, but its unlikely that the polar area chart will have a lot of data\r\n\t\t\tvar visibleCount = 0;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tfor (var i = 0; i < index; ++i) {\r\n\t\t\t\tif (!isNaN(dataset.data[i]) && !meta.data[i].hidden) {\r\n\t\t\t\t\t++visibleCount;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//var negHalfPI = -0.5 * Math.PI;\r\n\t\t\tvar datasetStartAngle = opts.startAngle;\r\n\t\t\tvar distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\t\tvar startAngle = datasetStartAngle + (circumference * visibleCount);\r\n\t\t\tvar endAngle = startAngle + (arc.hidden ? 0 : circumference);\r\n\r\n\t\t\tvar resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\r\n\t\t\thelpers.extend(arc, {\r\n\t\t\t\t// Utility\r\n\t\t\t\t_datasetIndex: me.index,\r\n\t\t\t\t_index: index,\r\n\t\t\t\t_scale: scale,\r\n\r\n\t\t\t\t// Desired view properties\r\n\t\t\t\t_model: {\r\n\t\t\t\t\tx: centerX,\r\n\t\t\t\t\ty: centerY,\r\n\t\t\t\t\tinnerRadius: 0,\r\n\t\t\t\t\touterRadius: reset ? resetRadius : distance,\r\n\t\t\t\t\tstartAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\r\n\t\t\t\t\tendAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\r\n\t\t\t\t\tlabel: getValueAtIndexOrDefault(labels, index, labels[index])\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Apply border and fill style\r\n\t\t\tme.removeHoverStyle(arc);\r\n\r\n\t\t\tarc.pivot();\r\n\t\t},\r\n\r\n\t\tremoveHoverStyle: function(arc) {\r\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);\r\n\t\t},\r\n\r\n\t\tcountVisibleElements: function() {\r\n\t\t\tvar dataset = this.getDataset();\r\n\t\t\tvar meta = this.getMeta();\r\n\t\t\tvar count = 0;\r\n\r\n\t\t\thelpers.each(meta.data, function(element, index) {\r\n\t\t\t\tif (!isNaN(dataset.data[index]) && !element.hidden) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn count;\r\n\t\t},\r\n\r\n\t\tcalculateCircumference: function(value) {\r\n\t\t\tvar count = this.getMeta().count;\r\n\t\t\tif (count > 0 && !isNaN(value)) {\r\n\t\t\t\treturn (2 * Math.PI) / count;\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],20:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.radar = {\r\n\t\tscale: {\r\n\t\t\ttype: \"radialLinear\"\r\n\t\t},\r\n\t\telements: {\r\n\t\t\tline: {\r\n\t\t\t\ttension: 0 // no bezier in radar\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tChart.controllers.radar = Chart.DatasetController.extend({\r\n\r\n\t\tdatasetElementType: Chart.elements.Line,\r\n\r\n\t\tdataElementType: Chart.elements.Point,\r\n\r\n\t\tlinkScales: helpers.noop,\r\n\r\n\t\taddElementAndReset: function(index) {\r\n\t\t\tChart.DatasetController.prototype.addElementAndReset.call(this, index);\r\n\r\n\t\t\t// Make sure bezier control points are updated\r\n\t\t\tthis.updateBezierControlPoints();\r\n\t\t},\r\n\r\n\t\tupdate: function(reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar line = meta.dataset;\r\n\t\t\tvar points = meta.data;\r\n\t\t\tvar custom = line.custom || {};\r\n\t\t\tvar dataset = me.getDataset();\r\n\t\t\tvar lineElementOptions = me.chart.options.elements.line;\r\n\t\t\tvar scale = me.chart.scale;\r\n\r\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\tif ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {\r\n\t\t\t\tdataset.lineTension = dataset.tension;\r\n\t\t\t}\r\n\r\n\t\t\thelpers.extend(meta.dataset, {\r\n\t\t\t\t// Utility\r\n\t\t\t\t_datasetIndex: me.index,\r\n\t\t\t\t// Data\r\n\t\t\t\t_children: points,\r\n\t\t\t\t_loop: true,\r\n\t\t\t\t// Model\r\n\t\t\t\t_model: {\r\n\t\t\t\t\t// Appearance\r\n\t\t\t\t\ttension: custom.tension ? custom.tension : helpers.getValueOrDefault(dataset.lineTension, lineElementOptions.tension),\r\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor),\r\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth),\r\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor),\r\n\t\t\t\t\tfill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill),\r\n\t\t\t\t\tborderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle),\r\n\t\t\t\t\tborderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash),\r\n\t\t\t\t\tborderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset),\r\n\t\t\t\t\tborderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle),\r\n\r\n\t\t\t\t\t// Scale\r\n\t\t\t\t\tscaleTop: scale.top,\r\n\t\t\t\t\tscaleBottom: scale.bottom,\r\n\t\t\t\t\tscaleZero: scale.getBasePosition()\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tmeta.dataset.pivot();\r\n\r\n\t\t\t// Update Points\r\n\t\t\thelpers.each(points, function(point, index) {\r\n\t\t\t\tme.updateElement(point, index, reset);\r\n\t\t\t}, me);\r\n\r\n\r\n\t\t\t// Update bezier control points\r\n\t\t\tme.updateBezierControlPoints();\r\n\t\t},\r\n\t\tupdateElement: function(point, index, reset) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar dataset = me.getDataset();\r\n\t\t\tvar scale = me.chart.scale;\r\n\t\t\tvar pointElementOptions = me.chart.options.elements.point;\r\n\t\t\tvar pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\r\n\r\n\t\t\thelpers.extend(point, {\r\n\t\t\t\t// Utility\r\n\t\t\t\t_datasetIndex: me.index,\r\n\t\t\t\t_index: index,\r\n\t\t\t\t_scale: scale,\r\n\r\n\t\t\t\t// Desired view properties\r\n\t\t\t\t_model: {\r\n\t\t\t\t\tx: reset ? scale.xCenter : pointPosition.x, // value not used in dataset scale, but we want a consistent API between scales\r\n\t\t\t\t\ty: reset ? scale.yCenter : pointPosition.y,\r\n\r\n\t\t\t\t\t// Appearance\r\n\t\t\t\t\ttension: custom.tension ? custom.tension : helpers.getValueOrDefault(dataset.tension, me.chart.options.elements.line.tension),\r\n\t\t\t\t\tradius: custom.radius ? custom.radius : helpers.getValueAtIndexOrDefault(dataset.pointRadius, index, pointElementOptions.radius),\r\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.pointBackgroundColor, index, pointElementOptions.backgroundColor),\r\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.pointBorderColor, index, pointElementOptions.borderColor),\r\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.pointBorderWidth, index, pointElementOptions.borderWidth),\r\n\t\t\t\t\tpointStyle: custom.pointStyle ? custom.pointStyle : helpers.getValueAtIndexOrDefault(dataset.pointStyle, index, pointElementOptions.pointStyle),\r\n\r\n\t\t\t\t\t// Tooltip\r\n\t\t\t\t\thitRadius: custom.hitRadius ? custom.hitRadius : helpers.getValueAtIndexOrDefault(dataset.hitRadius, index, pointElementOptions.hitRadius)\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tpoint._model.skip = custom.skip ? custom.skip : (isNaN(point._model.x) || isNaN(point._model.y));\r\n\t\t},\r\n\t\tupdateBezierControlPoints: function() {\r\n\t\t\tvar chartArea = this.chart.chartArea;\r\n\t\t\tvar meta = this.getMeta();\r\n\r\n\t\t\thelpers.each(meta.data, function(point, index) {\r\n\t\t\t\tvar model = point._model;\r\n\t\t\t\tvar controlPoints = helpers.splineCurve(\r\n\t\t\t\t\thelpers.previousItem(meta.data, index, true)._model,\r\n\t\t\t\t\tmodel,\r\n\t\t\t\t\thelpers.nextItem(meta.data, index, true)._model,\r\n\t\t\t\t\tmodel.tension\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Prevent the bezier going outside of the bounds of the graph\r\n\t\t\t\tmodel.controlPointPreviousX = Math.max(Math.min(controlPoints.previous.x, chartArea.right), chartArea.left);\r\n\t\t\t\tmodel.controlPointPreviousY = Math.max(Math.min(controlPoints.previous.y, chartArea.bottom), chartArea.top);\r\n\r\n\t\t\t\tmodel.controlPointNextX = Math.max(Math.min(controlPoints.next.x, chartArea.right), chartArea.left);\r\n\t\t\t\tmodel.controlPointNextY = Math.max(Math.min(controlPoints.next.y, chartArea.bottom), chartArea.top);\r\n\r\n\t\t\t\t// Now pivot the point for animation\r\n\t\t\t\tpoint.pivot();\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tdraw: function(ease) {\r\n\t\t\tvar meta = this.getMeta();\r\n\t\t\tvar easingDecimal = ease || 1;\r\n\r\n\t\t\t// Transition Point Locations\r\n\t\t\thelpers.each(meta.data, function(point) {\r\n\t\t\t\tpoint.transition(easingDecimal);\r\n\t\t\t});\r\n\r\n\t\t\t// Transition and Draw the line\r\n\t\t\tmeta.dataset.transition(easingDecimal).draw();\r\n\r\n\t\t\t// Draw the points\r\n\t\t\thelpers.each(meta.data, function(point) {\r\n\t\t\t\tpoint.draw();\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tsetHoverStyle: function(point) {\r\n\t\t\t// Point\r\n\t\t\tvar dataset = this.chart.data.datasets[point._datasetIndex];\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar index = point._index;\r\n\t\t\tvar model = point._model;\r\n\r\n\t\t\tmodel.radius = custom.hoverRadius ? custom.hoverRadius : helpers.getValueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius);\r\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.getValueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));\r\n\t\t\tmodel.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));\r\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth);\r\n\t\t},\r\n\r\n\t\tremoveHoverStyle: function(point) {\r\n\t\t\tvar dataset = this.chart.data.datasets[point._datasetIndex];\r\n\t\t\tvar custom = point.custom || {};\r\n\t\t\tvar index = point._index;\r\n\t\t\tvar model = point._model;\r\n\t\t\tvar pointElementOptions = this.chart.options.elements.point;\r\n\r\n\t\t\tmodel.radius = custom.radius ? custom.radius : helpers.getValueAtIndexOrDefault(dataset.radius, index, pointElementOptions.radius);\r\n\t\t\tmodel.backgroundColor = custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.pointBackgroundColor, index, pointElementOptions.backgroundColor);\r\n\t\t\tmodel.borderColor = custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.pointBorderColor, index, pointElementOptions.borderColor);\r\n\t\t\tmodel.borderWidth = custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.pointBorderWidth, index, pointElementOptions.borderWidth);\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],21:[function(require,module,exports){\r\n/*global window: false */\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.global.animation = {\r\n\t\tduration: 1000,\r\n\t\teasing: \"easeOutQuart\",\r\n\t\tonProgress: helpers.noop,\r\n\t\tonComplete: helpers.noop\r\n\t};\r\n\r\n\tChart.Animation = Chart.Element.extend({\r\n\t\tcurrentStep: null, // the current animation step\r\n\t\tnumSteps: 60, // default number of steps\r\n\t\teasing: \"\", // the easing to use for this animation\r\n\t\trender: null, // render function used by the animation service\r\n\r\n\t\tonAnimationProgress: null, // user specified callback to fire on each step of the animation\r\n\t\tonAnimationComplete: null // user specified callback to fire when the animation finishes\r\n\t});\r\n\r\n\tChart.animationService = {\r\n\t\tframeDuration: 17,\r\n\t\tanimations: [],\r\n\t\tdropFrames: 0,\r\n\t\trequest: null,\r\n\t\taddAnimation: function(chartInstance, animationObject, duration, lazy) {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\tif (!lazy) {\r\n\t\t\t\tchartInstance.animating = true;\r\n\t\t\t}\r\n\r\n\t\t\tfor (var index = 0; index < me.animations.length; ++index) {\r\n\t\t\t\tif (me.animations[index].chartInstance === chartInstance) {\r\n\t\t\t\t\t// replacing an in progress animation\r\n\t\t\t\t\tme.animations[index].animationObject = animationObject;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tme.animations.push({\r\n\t\t\t\tchartInstance: chartInstance,\r\n\t\t\t\tanimationObject: animationObject\r\n\t\t\t});\r\n\r\n\t\t\t// If there are no animations queued, manually kickstart a digest, for lack of a better word\r\n\t\t\tif (me.animations.length === 1) {\r\n\t\t\t\tme.requestAnimationFrame();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Cancel the animation for a given chart instance\r\n\t\tcancelAnimation: function(chartInstance) {\r\n\t\t\tvar index = helpers.findIndex(this.animations, function(animationWrapper) {\r\n\t\t\t\treturn animationWrapper.chartInstance === chartInstance;\r\n\t\t\t});\r\n\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.animations.splice(index, 1);\r\n\t\t\t\tchartInstance.animating = false;\r\n\t\t\t}\r\n\t\t},\r\n\t\trequestAnimationFrame: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tif (me.request === null) {\r\n\t\t\t\t// Skip animation frame requests until the active one is executed.\r\n\t\t\t\t// This can happen when processing mouse events, e.g. 'mousemove'\r\n\t\t\t\t// and 'mouseout' events will trigger multiple renders.\r\n\t\t\t\tme.request = helpers.requestAnimFrame.call(window, function() {\r\n\t\t\t\t\tme.request = null;\r\n\t\t\t\t\tme.startDigest();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t\tstartDigest: function() {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\tvar startTime = Date.now();\r\n\t\t\tvar framesToDrop = 0;\r\n\r\n\t\t\tif (me.dropFrames > 1) {\r\n\t\t\t\tframesToDrop = Math.floor(me.dropFrames);\r\n\t\t\t\tme.dropFrames = me.dropFrames % 1;\r\n\t\t\t}\r\n\r\n\t\t\tvar i = 0;\r\n\t\t\twhile (i < me.animations.length) {\r\n\t\t\t\tif (me.animations[i].animationObject.currentStep === null) {\r\n\t\t\t\t\tme.animations[i].animationObject.currentStep = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tme.animations[i].animationObject.currentStep += 1 + framesToDrop;\r\n\r\n\t\t\t\tif (me.animations[i].animationObject.currentStep > me.animations[i].animationObject.numSteps) {\r\n\t\t\t\t\tme.animations[i].animationObject.currentStep = me.animations[i].animationObject.numSteps;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tme.animations[i].animationObject.render(me.animations[i].chartInstance, me.animations[i].animationObject);\r\n\t\t\t\tif (me.animations[i].animationObject.onAnimationProgress && me.animations[i].animationObject.onAnimationProgress.call) {\r\n\t\t\t\t\tme.animations[i].animationObject.onAnimationProgress.call(me.animations[i].chartInstance, me.animations[i]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (me.animations[i].animationObject.currentStep === me.animations[i].animationObject.numSteps) {\r\n\t\t\t\t\tif (me.animations[i].animationObject.onAnimationComplete && me.animations[i].animationObject.onAnimationComplete.call) {\r\n\t\t\t\t\t\tme.animations[i].animationObject.onAnimationComplete.call(me.animations[i].chartInstance, me.animations[i]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// executed the last frame. Remove the animation.\r\n\t\t\t\t\tme.animations[i].chartInstance.animating = false;\r\n\r\n\t\t\t\t\tme.animations.splice(i, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t++i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar endTime = Date.now();\r\n\t\t\tvar dropFrames = (endTime - startTime) / me.frameDuration;\r\n\r\n\t\t\tme.dropFrames += dropFrames;\r\n\r\n\t\t\t// Do we have more stuff to animate?\r\n\t\t\tif (me.animations.length > 0) {\r\n\t\t\t\tme.requestAnimationFrame();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n};\r\n},{}],22:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\t// Global Chart canvas helpers object for drawing items to canvas\r\n\tvar helpers = Chart.canvasHelpers = {};\r\n\r\n\thelpers.drawPoint = function(ctx, pointStyle, radius, x, y) {\r\n\t\tvar type, edgeLength, xOffset, yOffset, height, size;\r\n\r\n\t\tif (typeof pointStyle === 'object') {\r\n\t\t\ttype = pointStyle.toString();\r\n\t\t\tif (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\r\n\t\t\t\tctx.drawImage(pointStyle, x - pointStyle.width / 2, y - pointStyle.height / 2);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isNaN(radius) || radius <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tswitch (pointStyle) {\r\n\t\t// Default includes circle\r\n\t\tdefault:\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.arc(x, y, radius, 0, Math.PI * 2);\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.fill();\r\n\t\t\tbreak;\r\n\t\tcase 'triangle':\r\n\t\t\tctx.beginPath();\r\n\t\t\tedgeLength = 3 * radius / Math.sqrt(3);\r\n\t\t\theight = edgeLength * Math.sqrt(3) / 2;\r\n\t\t\tctx.moveTo(x - edgeLength / 2, y + height / 3);\r\n\t\t\tctx.lineTo(x + edgeLength / 2, y + height / 3);\r\n\t\t\tctx.lineTo(x, y - 2 * height / 3);\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.fill();\r\n\t\t\tbreak;\r\n\t\tcase 'rect':\r\n\t\t\tsize = 1 / Math.SQRT2 * radius;\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.fillRect(x - size, y - size, 2 * size,  2 * size);\r\n\t\t\tctx.strokeRect(x - size, y - size, 2 * size, 2 * size);\r\n\t\t\tbreak;\r\n\t\tcase 'rectRot':\r\n\t\t\tsize = 1 / Math.SQRT2 * radius;\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x - size, y);\r\n\t\t\tctx.lineTo(x, y + size);\r\n\t\t\tctx.lineTo(x + size, y);\r\n\t\t\tctx.lineTo(x, y - size);\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.fill();\r\n\t\t\tbreak;\r\n\t\tcase 'cross':\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x, y + radius);\r\n\t\t\tctx.lineTo(x, y - radius);\r\n\t\t\tctx.moveTo(x - radius, y);\r\n\t\t\tctx.lineTo(x + radius, y);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'crossRot':\r\n\t\t\tctx.beginPath();\r\n\t\t\txOffset = Math.cos(Math.PI / 4) * radius;\r\n\t\t\tyOffset = Math.sin(Math.PI / 4) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x - xOffset, y + yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y - yOffset);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'star':\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x, y + radius);\r\n\t\t\tctx.lineTo(x, y - radius);\r\n\t\t\tctx.moveTo(x - radius, y);\r\n\t\t\tctx.lineTo(x + radius, y);\r\n\t\t\txOffset = Math.cos(Math.PI / 4) * radius;\r\n\t\t\tyOffset = Math.sin(Math.PI / 4) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x - xOffset, y + yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y - yOffset);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'line':\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x - radius, y);\r\n\t\t\tctx.lineTo(x + radius, y);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'dash':\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t\tctx.lineTo(x + radius, y);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tctx.stroke();\r\n\t};\r\n};\r\n},{}],23:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\t//Create a dictionary of chart types, to allow for extension of existing types\r\n\tChart.types = {};\r\n\r\n\t//Store a reference to each instance - allowing us to globally resize chart instances on window resize.\r\n\t//Destroy method on the chart will remove the instance of the chart from this reference.\r\n\tChart.instances = {};\r\n\r\n\t// Controllers available for dataset visualization eg. bar, line, slice, etc.\r\n\tChart.controllers = {};\r\n\r\n\t/**\r\n\t * @class Chart.Controller\r\n\t * The main controller of a chart.\r\n\t */\r\n\tChart.Controller = function(instance) {\r\n\r\n\t\tthis.chart = instance;\r\n\t\tthis.config = instance.config;\r\n\t\tthis.options = this.config.options = helpers.configMerge(Chart.defaults.global, Chart.defaults[this.config.type], this.config.options || {});\r\n\t\tthis.id = helpers.uid();\r\n\r\n\t\tObject.defineProperty(this, 'data', {\r\n\t\t\tget: function() {\r\n\t\t\t\treturn this.config.data;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t//Add the chart instance to the global namespace\r\n\t\tChart.instances[this.id] = this;\r\n\r\n\t\tif (this.options.responsive) {\r\n\t\t\t// Silent resize before chart draws\r\n\t\t\tthis.resize(true);\r\n\t\t}\r\n\r\n\t\tthis.initialize();\r\n\r\n\t\treturn this;\r\n\t};\r\n\r\n\thelpers.extend(Chart.Controller.prototype, /** @lends Chart.Controller */ {\r\n\r\n\t\tinitialize: function() {\r\n\t\t\tvar me = this;\r\n\t\t\t// Before init plugin notification\r\n\t\t\tChart.plugins.notify('beforeInit', [me]);\r\n\r\n\t\t\tme.bindEvents();\r\n\r\n\t\t\t// Make sure controllers are built first so that each dataset is bound to an axis before the scales\r\n\t\t\t// are built\r\n\t\t\tme.ensureScalesHaveIDs();\r\n\t\t\tme.buildOrUpdateControllers();\r\n\t\t\tme.buildScales();\r\n\t\t\tme.updateLayout();\r\n\t\t\tme.resetElements();\r\n\t\t\tme.initToolTip();\r\n\t\t\tme.update();\r\n\r\n\t\t\t// After init plugin notification\r\n\t\t\tChart.plugins.notify('afterInit', [me]);\r\n\r\n\t\t\treturn me;\r\n\t\t},\r\n\r\n\t\tclear: function() {\r\n\t\t\thelpers.clear(this.chart);\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tstop: function() {\r\n\t\t\t// Stops any current animation loop occuring\r\n\t\t\tChart.animationService.cancelAnimation(this);\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tresize: function resize(silent) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar chart = me.chart;\r\n\t\t\tvar canvas = chart.canvas;\r\n\t\t\tvar newWidth = helpers.getMaximumWidth(canvas);\r\n\t\t\tvar aspectRatio = chart.aspectRatio;\r\n\t\t\tvar newHeight = (me.options.maintainAspectRatio && isNaN(aspectRatio) === false && isFinite(aspectRatio) && aspectRatio !== 0) ? newWidth / aspectRatio : helpers.getMaximumHeight(canvas);\r\n\r\n\t\t\tvar sizeChanged = chart.width !== newWidth || chart.height !== newHeight;\r\n\r\n\t\t\tif (!sizeChanged) {\r\n\t\t\t\treturn me;\r\n\t\t\t}\r\n\r\n\t\t\tcanvas.width = chart.width = newWidth;\r\n\t\t\tcanvas.height = chart.height = newHeight;\r\n\r\n\t\t\thelpers.retinaScale(chart);\r\n\r\n\t\t\t// Notify any plugins about the resize\r\n\t\t\tvar newSize = { width: newWidth, height: newHeight };\r\n\t\t\tChart.plugins.notify('resize', [me, newSize]);\r\n\r\n\t\t\t// Notify of resize\r\n\t\t\tif (me.options.onResize) {\r\n\t\t\t\tme.options.onResize(me, newSize);\r\n\t\t\t}\r\n\r\n\t\t\tif (!silent) {\r\n\t\t\t\tme.stop();\r\n\t\t\t\tme.update(me.options.responsiveAnimationDuration);\r\n\t\t\t}\r\n\r\n\t\t\treturn me;\r\n\t\t},\r\n\r\n\t\tensureScalesHaveIDs: function() {\r\n\t\t\tvar options = this.options;\r\n\t\t\tvar scalesOptions = options.scales || {};\r\n\t\t\tvar scaleOptions = options.scale;\r\n\r\n\t\t\thelpers.each(scalesOptions.xAxes, function(xAxisOptions, index) {\r\n\t\t\t\txAxisOptions.id = xAxisOptions.id || ('x-axis-' + index);\r\n\t\t\t});\r\n\r\n\t\t\thelpers.each(scalesOptions.yAxes, function(yAxisOptions, index) {\r\n\t\t\t\tyAxisOptions.id = yAxisOptions.id || ('y-axis-' + index);\r\n\t\t\t});\r\n\r\n\t\t\tif (scaleOptions) {\r\n\t\t\t\tscaleOptions.id = scaleOptions.id || 'scale';\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Builds a map of scale ID to scale object for future lookup.\r\n\t\t */\r\n\t\tbuildScales: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar options = me.options;\r\n\t\t\tvar scales = me.scales = {};\r\n\t\t\tvar items = [];\r\n\r\n\t\t\tif (options.scales) {\r\n\t\t\t\titems = items.concat(\r\n\t\t\t\t\t(options.scales.xAxes || []).map(function(xAxisOptions) {\r\n\t\t\t\t\t\treturn { options: xAxisOptions, dtype: 'category' }; }),\r\n\t\t\t\t\t(options.scales.yAxes || []).map(function(yAxisOptions) {\r\n\t\t\t\t\t\treturn { options: yAxisOptions, dtype: 'linear' }; }));\r\n\t\t\t}\r\n\r\n\t\t\tif (options.scale) {\r\n\t\t\t\titems.push({ options: options.scale, dtype: 'radialLinear', isDefault: true });\r\n\t\t\t}\r\n\r\n\t\t\thelpers.each(items, function(item) {\r\n\t\t\t\tvar scaleOptions = item.options;\r\n\t\t\t\tvar scaleType = helpers.getValueOrDefault(scaleOptions.type, item.dtype);\r\n\t\t\t\tvar scaleClass = Chart.scaleService.getScaleConstructor(scaleType);\r\n\t\t\t\tif (!scaleClass) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar scale = new scaleClass({\r\n\t\t\t\t\tid: scaleOptions.id,\r\n\t\t\t\t\toptions: scaleOptions,\r\n\t\t\t\t\tctx: me.chart.ctx,\r\n\t\t\t\t\tchart: me\r\n\t\t\t\t});\r\n\r\n\t\t\t\tscales[scale.id] = scale;\r\n\r\n\t\t\t\t// TODO(SB): I think we should be able to remove this custom case (options.scale)\r\n\t\t\t\t// and consider it as a regular scale part of the \"scales\"\" map only! This would\r\n\t\t\t\t// make the logic easier and remove some useless? custom code.\r\n\t\t\t\tif (item.isDefault) {\r\n\t\t\t\t\tme.scale = scale;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tChart.scaleService.addScalesToLayout(this);\r\n\t\t},\r\n\r\n\t\tupdateLayout: function() {\r\n\t\t\tChart.layoutService.update(this, this.chart.width, this.chart.height);\r\n\t\t},\r\n\r\n\t\tbuildOrUpdateControllers: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar types = [];\r\n\t\t\tvar newControllers = [];\r\n\r\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tvar meta = me.getDatasetMeta(datasetIndex);\r\n\t\t\t\tif (!meta.type) {\r\n\t\t\t\t\tmeta.type = dataset.type || me.config.type;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttypes.push(meta.type);\r\n\r\n\t\t\t\tif (meta.controller) {\r\n\t\t\t\t\tmeta.controller.updateIndex(datasetIndex);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmeta.controller = new Chart.controllers[meta.type](me, datasetIndex);\r\n\t\t\t\t\tnewControllers.push(meta.controller);\r\n\t\t\t\t}\r\n\t\t\t}, me);\r\n\r\n\t\t\tif (types.length > 1) {\r\n\t\t\t\tfor (var i = 1; i < types.length; i++) {\r\n\t\t\t\t\tif (types[i] !== types[i - 1]) {\r\n\t\t\t\t\t\tme.isCombo = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newControllers;\r\n\t\t},\r\n\r\n\t\tresetElements: function() {\r\n\t\t\tvar me = this;\r\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tme.getDatasetMeta(datasetIndex).controller.reset();\r\n\t\t\t}, me);\r\n\t\t},\r\n\r\n\t\tupdate: function update(animationDuration, lazy) {\r\n\t\t\tvar me = this;\r\n\t\t\tChart.plugins.notify('beforeUpdate', [me]);\r\n\r\n\t\t\t// In case the entire data object changed\r\n\t\t\tme.tooltip._data = me.data;\r\n\r\n\t\t\t// Make sure dataset controllers are updated and new controllers are reset\r\n\t\t\tvar newControllers = me.buildOrUpdateControllers();\r\n\r\n\t\t\t// Make sure all dataset controllers have correct meta data counts\r\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tme.getDatasetMeta(datasetIndex).controller.buildOrUpdateElements();\r\n\t\t\t}, me);\r\n\r\n\t\t\tChart.layoutService.update(me, me.chart.width, me.chart.height);\r\n\r\n\t\t\t// Apply changes to the dataets that require the scales to have been calculated i.e BorderColor chages\r\n\t\t\tChart.plugins.notify('afterScaleUpdate', [me]);\r\n\r\n\t\t\t// Can only reset the new controllers after the scales have been updated\r\n\t\t\thelpers.each(newControllers, function(controller) {\r\n\t\t\t\tcontroller.reset();\r\n\t\t\t});\r\n\r\n\t\t\tme.updateDatasets();\r\n\r\n\t\t\t// Do this before render so that any plugins that need final scale updates can use it\r\n\t\t\tChart.plugins.notify('afterUpdate', [me]);\r\n\r\n\t\t\tme.render(animationDuration, lazy);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @method beforeDatasetsUpdate\r\n\t\t * @description Called before all datasets are updated. If a plugin returns false,\r\n\t\t * the datasets update will be cancelled until another chart update is triggered.\r\n\t\t * @param {Object} instance the chart instance being updated.\r\n\t\t * @returns {Boolean} false to cancel the datasets update.\r\n\t\t * @memberof Chart.PluginBase\r\n\t\t * @since version 2.1.5\r\n\t\t * @instance\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * @method afterDatasetsUpdate\r\n\t\t * @description Called after all datasets have been updated. Note that this\r\n\t\t * extension will not be called if the datasets update has been cancelled.\r\n\t\t * @param {Object} instance the chart instance being updated.\r\n\t\t * @memberof Chart.PluginBase\r\n\t\t * @since version 2.1.5\r\n\t\t * @instance\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * Updates all datasets unless a plugin returns false to the beforeDatasetsUpdate\r\n\t\t * extension, in which case no datasets will be updated and the afterDatasetsUpdate\r\n\t\t * notification will be skipped.\r\n\t\t * @protected\r\n\t\t * @instance\r\n\t\t */\r\n\t\tupdateDatasets: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar i, ilen;\r\n\r\n\t\t\tif (Chart.plugins.notify('beforeDatasetsUpdate', [ me ])) {\r\n\t\t\t\tfor (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\r\n\t\t\t\t\tme.getDatasetMeta(i).controller.update();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tChart.plugins.notify('afterDatasetsUpdate', [ me ]);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\trender: function render(duration, lazy) {\r\n\t\t\tvar me = this;\r\n\t\t\tChart.plugins.notify('beforeRender', [me]);\r\n\r\n\t\t\tvar animationOptions = me.options.animation;\r\n\t\t\tif (animationOptions && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration === 'undefined' && animationOptions.duration !== 0))) {\r\n\t\t\t\tvar animation = new Chart.Animation();\r\n\t\t\t\tanimation.numSteps = (duration || animationOptions.duration) / 16.66; //60 fps\r\n\t\t\t\tanimation.easing = animationOptions.easing;\r\n\r\n\t\t\t\t// render function\r\n\t\t\t\tanimation.render = function(chartInstance, animationObject) {\r\n\t\t\t\t\tvar easingFunction = helpers.easingEffects[animationObject.easing];\r\n\t\t\t\t\tvar stepDecimal = animationObject.currentStep / animationObject.numSteps;\r\n\t\t\t\t\tvar easeDecimal = easingFunction(stepDecimal);\r\n\r\n\t\t\t\t\tchartInstance.draw(easeDecimal, stepDecimal, animationObject.currentStep);\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// user events\r\n\t\t\t\tanimation.onAnimationProgress = animationOptions.onProgress;\r\n\t\t\t\tanimation.onAnimationComplete = animationOptions.onComplete;\r\n\r\n\t\t\t\tChart.animationService.addAnimation(me, animation, duration, lazy);\r\n\t\t\t} else {\r\n\t\t\t\tme.draw();\r\n\t\t\t\tif (animationOptions && animationOptions.onComplete && animationOptions.onComplete.call) {\r\n\t\t\t\t\tanimationOptions.onComplete.call(me);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn me;\r\n\t\t},\r\n\r\n\t\tdraw: function(ease) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar easingDecimal = ease || 1;\r\n\t\t\tme.clear();\r\n\r\n\t\t\tChart.plugins.notify('beforeDraw', [me, easingDecimal]);\r\n\r\n\t\t\t// Draw all the scales\r\n\t\t\thelpers.each(me.boxes, function(box) {\r\n\t\t\t\tbox.draw(me.chartArea);\r\n\t\t\t}, me);\r\n\t\t\tif (me.scale) {\r\n\t\t\t\tme.scale.draw();\r\n\t\t\t}\r\n\r\n\t\t\tChart.plugins.notify('beforeDatasetsDraw', [me, easingDecimal]);\r\n\r\n\t\t\t// Draw each dataset via its respective controller (reversed to support proper line stacking)\r\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tif (me.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\t\tme.getDatasetMeta(datasetIndex).controller.draw(ease);\r\n\t\t\t\t}\r\n\t\t\t}, me, true);\r\n\r\n\t\t\tChart.plugins.notify('afterDatasetsDraw', [me, easingDecimal]);\r\n\r\n\t\t\t// Finally draw the tooltip\r\n\t\t\tme.tooltip.transition(easingDecimal).draw();\r\n\r\n\t\t\tChart.plugins.notify('afterDraw', [me, easingDecimal]);\r\n\t\t},\r\n\r\n\t\t// Get the single element that was clicked on\r\n\t\t// @return : An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw\r\n\t\tgetElementAtEvent: function(e) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar eventPosition = helpers.getRelativePosition(e, me.chart);\r\n\t\t\tvar elementsArray = [];\r\n\r\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tif (me.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\t\tvar meta = me.getDatasetMeta(datasetIndex);\r\n\t\t\t\t\thelpers.each(meta.data, function(element) {\r\n\t\t\t\t\t\tif (element.inRange(eventPosition.x, eventPosition.y)) {\r\n\t\t\t\t\t\t\telementsArray.push(element);\r\n\t\t\t\t\t\t\treturn elementsArray;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn elementsArray.slice(0, 1);\r\n\t\t},\r\n\r\n\t\tgetElementsAtEvent: function(e) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar eventPosition = helpers.getRelativePosition(e, me.chart);\r\n\t\t\tvar elementsArray = [];\r\n\r\n\t\t\tvar found = (function() {\r\n\t\t\t\tif (me.data.datasets) {\r\n\t\t\t\t\tfor (var i = 0; i < me.data.datasets.length; i++) {\r\n\t\t\t\t\t\tvar meta = me.getDatasetMeta(i);\r\n\t\t\t\t\t\tif (me.isDatasetVisible(i)) {\r\n\t\t\t\t\t\t\tfor (var j = 0; j < meta.data.length; j++) {\r\n\t\t\t\t\t\t\t\tif (meta.data[j].inRange(eventPosition.x, eventPosition.y)) {\r\n\t\t\t\t\t\t\t\t\treturn meta.data[j];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).call(me);\r\n\r\n\t\t\tif (!found) {\r\n\t\t\t\treturn elementsArray;\r\n\t\t\t}\r\n\r\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tif (me.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\t\tvar meta = me.getDatasetMeta(datasetIndex),\r\n\t\t\t\t\t\telement = meta.data[found._index];\r\n\t\t\t\t\tif(element && !element._view.skip){\r\n\t\t\t\t\t\telementsArray.push(element);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, me);\r\n\r\n\t\t\treturn elementsArray;\r\n\t\t},\r\n\r\n\t\tgetElementsAtXAxis: function(e) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar eventPosition = helpers.getRelativePosition(e, me.chart);\r\n\t\t\tvar elementsArray = [];\r\n\r\n\t\t\tvar found = (function() {\r\n\t\t\t\tif (me.data.datasets) {\r\n\t\t\t\t\tfor (var i = 0; i < me.data.datasets.length; i++) {\r\n\t\t\t\t\t\tvar meta = me.getDatasetMeta(i);\r\n\t\t\t\t\t\tif (me.isDatasetVisible(i)) {\r\n\t\t\t\t\t\t\tfor (var j = 0; j < meta.data.length; j++) {\r\n\t\t\t\t\t\t\t\tif (meta.data[j].inLabelRange(eventPosition.x, eventPosition.y)) {\r\n\t\t\t\t\t\t\t\t\treturn meta.data[j];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).call(me);\r\n\r\n\t\t\tif (!found) {\r\n\t\t\t\treturn elementsArray;\r\n\t\t\t}\r\n\r\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tif (me.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\t\tvar meta = me.getDatasetMeta(datasetIndex);\r\n\t\t\t\t\tvar index = helpers.findIndex(meta.data, function (it) {\r\n\t\t\t\t\t\treturn found._model.x === it._model.x;\r\n\t\t\t\t\t});\r\n\t\t\t\t\tif(index !== -1 && !meta.data[index]._view.skip) {\r\n\t\t\t\t\t\telementsArray.push(meta.data[index]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, me);\r\n\r\n\t\t\treturn elementsArray;\r\n\t\t},\t\t\r\n\r\n\t\tgetElementsAtEventForMode: function(e, mode) {\r\n\t\t\tvar me = this;\r\n\t\t\tswitch (mode) {\r\n\t\t\tcase 'single':\r\n\t\t\t\treturn me.getElementAtEvent(e);\r\n\t\t\tcase 'label':\r\n\t\t\t\treturn me.getElementsAtEvent(e);\r\n\t\t\tcase 'dataset':\r\n\t\t\t\treturn me.getDatasetAtEvent(e);\r\n            case 'x-axis':\r\n                return me.getElementsAtXAxis(e);\r\n\t\t\tdefault:\r\n\t\t\t\treturn e;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetDatasetAtEvent: function(e) {\r\n\t\t\tvar elementsArray = this.getElementAtEvent(e);\r\n\r\n\t\t\tif (elementsArray.length > 0) {\r\n\t\t\t\telementsArray = this.getDatasetMeta(elementsArray[0]._datasetIndex).data;\r\n\t\t\t}\r\n\r\n\t\t\treturn elementsArray;\r\n\t\t},\r\n\r\n\t\tgetDatasetMeta: function(datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar dataset = me.data.datasets[datasetIndex];\r\n\t\t\tif (!dataset._meta) {\r\n\t\t\t\tdataset._meta = {};\r\n\t\t\t}\r\n\r\n\t\t\tvar meta = dataset._meta[me.id];\r\n\t\t\tif (!meta) {\r\n\t\t\t\tmeta = dataset._meta[me.id] = {\r\n\t\t\t\ttype: null,\r\n\t\t\t\tdata: [],\r\n\t\t\t\tdataset: null,\r\n\t\t\t\tcontroller: null,\r\n\t\t\t\thidden: null,\t\t\t// See isDatasetVisible() comment\r\n\t\t\t\txAxisID: null,\r\n\t\t\t\tyAxisID: null\r\n\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn meta;\r\n\t\t},\r\n\r\n\t\tgetVisibleDatasetCount: function() {\r\n\t\t\tvar count = 0;\r\n\t\t\tfor (var i = 0, ilen = this.data.datasets.length; i<ilen; ++i) {\r\n\t\t\t\t if (this.isDatasetVisible(i)) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn count;\r\n\t\t},\r\n\r\n\t\tisDatasetVisible: function(datasetIndex) {\r\n\t\t\tvar meta = this.getDatasetMeta(datasetIndex);\r\n\r\n\t\t\t// meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,\r\n\t\t\t// the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.\r\n\t\t\treturn typeof meta.hidden === 'boolean'? !meta.hidden : !this.data.datasets[datasetIndex].hidden;\r\n\t\t},\r\n\r\n\t\tgenerateLegend: function() {\r\n\t\t\treturn this.options.legendCallback(this);\r\n\t\t},\r\n\r\n\t\tdestroy: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tme.stop();\r\n\t\t\tme.clear();\r\n\t\t\thelpers.unbindEvents(me, me.events);\r\n\t\t\thelpers.removeResizeListener(me.chart.canvas.parentNode);\r\n\r\n\t\t\t// Reset canvas height/width attributes\r\n\t\t\tvar canvas = me.chart.canvas;\r\n\t\t\tcanvas.width = me.chart.width;\r\n\t\t\tcanvas.height = me.chart.height;\r\n\r\n\t\t\t// if we scaled the canvas in response to a devicePixelRatio !== 1, we need to undo that transform here\r\n\t\t\tif (me.chart.originalDevicePixelRatio !== undefined) {\r\n\t\t\t\tme.chart.ctx.scale(1 / me.chart.originalDevicePixelRatio, 1 / me.chart.originalDevicePixelRatio);\r\n\t\t\t}\r\n\r\n\t\t\t// Reset to the old style since it may have been changed by the device pixel ratio changes\r\n\t\t\tcanvas.style.width = me.chart.originalCanvasStyleWidth;\r\n\t\t\tcanvas.style.height = me.chart.originalCanvasStyleHeight;\r\n\r\n\t\t\tChart.plugins.notify('destroy', [me]);\r\n\r\n\t\t\tdelete Chart.instances[me.id];\r\n\t\t},\r\n\r\n\t\ttoBase64Image: function() {\r\n\t\t\treturn this.chart.canvas.toDataURL.apply(this.chart.canvas, arguments);\r\n\t\t},\r\n\r\n\t\tinitToolTip: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tme.tooltip = new Chart.Tooltip({\r\n\t\t\t\t_chart: me.chart,\r\n\t\t\t\t_chartInstance: me,\r\n\t\t\t\t_data: me.data,\r\n\t\t\t\t_options: me.options.tooltips\r\n\t\t\t}, me);\r\n\t\t},\r\n\r\n\t\tbindEvents: function() {\r\n\t\t\tvar me = this;\r\n\t\t\thelpers.bindEvents(me, me.options.events, function(evt) {\r\n\t\t\t\tme.eventHandler(evt);\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tupdateHoverStyle: function(elements, mode, enabled) {\r\n\t\t\tvar method = enabled? 'setHoverStyle' : 'removeHoverStyle';\r\n\t\t\tvar element, i, ilen;\r\n\r\n\t\t\tswitch (mode) {\r\n\t\t\tcase 'single':\r\n\t\t\t\telements = [ elements[0] ];\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'label':\r\n\t\t\tcase 'dataset':\r\n            case 'x-axis':\r\n\t\t\t\t// elements = elements;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t// unsupported mode\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tfor (i=0, ilen=elements.length; i<ilen; ++i) {\r\n\t\t\t\telement = elements[i];\r\n\t\t\t\tif (element) {\r\n\t\t\t\t\tthis.getDatasetMeta(element._datasetIndex).controller[method](element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\teventHandler: function eventHandler(e) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar tooltip = me.tooltip;\r\n\t\t\tvar options = me.options || {};\r\n\t\t\tvar hoverOptions = options.hover;\r\n\t\t\tvar tooltipsOptions = options.tooltips;\r\n\r\n\t\t\tme.lastActive = me.lastActive || [];\r\n\t\t\tme.lastTooltipActive = me.lastTooltipActive || [];\r\n\r\n\t\t\t// Find Active Elements for hover and tooltips\r\n\t\t\tif (e.type === 'mouseout') {\r\n\t\t\t\tme.active = [];\r\n\t\t\t\tme.tooltipActive = [];\r\n\t\t\t} else {\r\n\t\t\t\tme.active = me.getElementsAtEventForMode(e, hoverOptions.mode);\r\n\t\t\t\tme.tooltipActive =  me.getElementsAtEventForMode(e, tooltipsOptions.mode);\r\n\t\t\t}\r\n\r\n\t\t\t// On Hover hook\r\n\t\t\tif (hoverOptions.onHover) {\r\n\t\t\t\thoverOptions.onHover.call(me, me.active);\r\n\t\t\t}\r\n\r\n\t\t\tif (e.type === 'mouseup' || e.type === 'click') {\r\n\t\t\t\tif (options.onClick) {\r\n\t\t\t\t\toptions.onClick.call(me, e, me.active);\r\n\t\t\t\t}\r\n\t\t\t\tif (me.legend && me.legend.handleEvent) {\r\n\t\t\t\t\tme.legend.handleEvent(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove styling for last active (even if it may still be active)\r\n\t\t\tif (me.lastActive.length) {\r\n\t\t\t\tme.updateHoverStyle(me.lastActive, hoverOptions.mode, false);\r\n\t\t\t}\r\n\r\n\t\t\t// Built in hover styling\r\n\t\t\tif (me.active.length && hoverOptions.mode) {\r\n\t\t\t\tme.updateHoverStyle(me.active, hoverOptions.mode, true);\r\n\t\t\t}\r\n\r\n\t\t\t// Built in Tooltips\r\n\t\t\tif (tooltipsOptions.enabled || tooltipsOptions.custom) {\r\n\t\t\t\ttooltip.initialize();\r\n\t\t\t\ttooltip._active = me.tooltipActive;\r\n\t\t\t\ttooltip.update(true);\r\n\t\t\t}\r\n\r\n\t\t\t// Hover animations\r\n\t\t\ttooltip.pivot();\r\n\r\n\t\t\tif (!me.animating) {\r\n\t\t\t\t// If entering, leaving, or changing elements, animate the change via pivot\r\n\t\t\t\tif (!helpers.arrayEquals(me.active, me.lastActive) ||\r\n\t\t\t\t\t!helpers.arrayEquals(me.tooltipActive, me.lastTooltipActive)) {\r\n\r\n\t\t\t\t\tme.stop();\r\n\r\n\t\t\t\t\tif (tooltipsOptions.enabled || tooltipsOptions.custom) {\r\n\t\t\t\t\t\ttooltip.update(true);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// We only need to render at this point. Updating will cause scales to be\r\n\t\t\t\t\t// recomputed generating flicker & using more memory than necessary.\r\n\t\t\t\t\tme.render(hoverOptions.animationDuration, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remember Last Actives\r\n\t\t\tme.lastActive = me.active;\r\n\t\t\tme.lastTooltipActive = me.tooltipActive;\r\n\t\t\treturn me;\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],24:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\tvar noop = helpers.noop;\r\n\r\n\t// Base class for all dataset controllers (line, bar, etc)\r\n\tChart.DatasetController = function(chart, datasetIndex) {\r\n\t\tthis.initialize.call(this, chart, datasetIndex);\r\n\t};\r\n\r\n\thelpers.extend(Chart.DatasetController.prototype, {\r\n\r\n\t\t/**\r\n\t\t * Element type used to generate a meta dataset (e.g. Chart.element.Line).\r\n\t\t * @type {Chart.core.element}\r\n\t\t */\r\n\t\tdatasetElementType: null,\r\n\r\n\t\t/**\r\n\t\t * Element type used to generate a meta data (e.g. Chart.element.Point).\r\n\t\t * @type {Chart.core.element}\r\n\t\t */\r\n\t\tdataElementType: null,\r\n\r\n\t\tinitialize: function(chart, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tme.chart = chart;\r\n\t\t\tme.index = datasetIndex;\r\n\t\t\tme.linkScales();\r\n\t\t\tme.addElements();\r\n\t\t},\r\n\r\n\t\tupdateIndex: function(datasetIndex) {\r\n\t\t\tthis.index = datasetIndex;\r\n\t\t},\r\n\r\n\t\tlinkScales: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar dataset = me.getDataset();\r\n\r\n\t\t\tif (meta.xAxisID === null) {\r\n\t\t\t\tmeta.xAxisID = dataset.xAxisID || me.chart.options.scales.xAxes[0].id;\r\n\t\t\t}\r\n\t\t\tif (meta.yAxisID === null) {\r\n\t\t\t\tmeta.yAxisID = dataset.yAxisID || me.chart.options.scales.yAxes[0].id;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetDataset: function() {\r\n\t\t\treturn this.chart.data.datasets[this.index];\r\n\t\t},\r\n\r\n\t\tgetMeta: function() {\r\n\t\t\treturn this.chart.getDatasetMeta(this.index);\r\n\t\t},\r\n\r\n\t\tgetScaleForId: function(scaleID) {\r\n\t\t\treturn this.chart.scales[scaleID];\r\n\t\t},\r\n\r\n\t\treset: function() {\r\n\t\t\tthis.update(true);\r\n\t\t},\r\n\r\n\t\tcreateMetaDataset: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar type = me.datasetElementType;\r\n\t\t\treturn type && new type({\r\n\t\t\t\t_chart: me.chart.chart,\r\n\t\t\t\t_datasetIndex: me.index\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tcreateMetaData: function(index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar type = me.dataElementType;\r\n\t\t\treturn type && new type({\r\n\t\t\t\t_chart: me.chart.chart,\r\n\t\t\t\t_datasetIndex: me.index,\r\n\t\t\t\t_index: index\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\taddElements: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar meta = me.getMeta();\r\n\t\t\tvar data = me.getDataset().data || [];\r\n\t\t\tvar metaData = meta.data;\r\n\t\t\tvar i, ilen;\r\n\r\n\t\t\tfor (i=0, ilen=data.length; i<ilen; ++i) {\r\n\t\t\t\tmetaData[i] = metaData[i] || me.createMetaData(meta, i);\r\n\t\t\t}\r\n\r\n\t\t\tmeta.dataset = meta.dataset || me.createMetaDataset();\r\n\t\t},\r\n\r\n\t\taddElementAndReset: function(index) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar element = me.createMetaData(index);\r\n\t\t\tme.getMeta().data.splice(index, 0, element);\r\n\t\t\tme.updateElement(element, index, true);\r\n\t\t},\r\n\r\n\t\tbuildOrUpdateElements: function() {\r\n\t\t\t// Handle the number of data points changing\r\n\t\t\tvar meta = this.getMeta(),\r\n\t\t\t\tmd = meta.data,\r\n\t\t\t\tnumData = this.getDataset().data.length,\r\n\t\t\t\tnumMetaData = md.length;\r\n\r\n\t\t\t// Make sure that we handle number of datapoints changing\r\n\t\t\tif (numData < numMetaData) {\r\n\t\t\t\t// Remove excess bars for data points that have been removed\r\n\t\t\t\tmd.splice(numData, numMetaData - numData);\r\n\t\t\t} else if (numData > numMetaData) {\r\n\t\t\t\t// Add new elements\r\n\t\t\t\tfor (var index = numMetaData; index < numData; ++index) {\r\n\t\t\t\t\tthis.addElementAndReset(index);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tupdate: noop,\r\n\r\n\t\tdraw: function(ease) {\r\n\t\t\tvar easingDecimal = ease || 1;\r\n\t\t\thelpers.each(this.getMeta().data, function(element) {\r\n\t\t\t\telement.transition(easingDecimal).draw();\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tremoveHoverStyle: function(element, elementOpts) {\r\n\t\t\tvar dataset = this.chart.data.datasets[element._datasetIndex],\r\n\t\t\t\tindex = element._index,\r\n\t\t\t\tcustom = element.custom || {},\r\n\t\t\t\tvalueOrDefault = helpers.getValueAtIndexOrDefault,\r\n\t\t\t\tmodel = element._model;\r\n\r\n\t\t\tmodel.backgroundColor = custom.backgroundColor ? custom.backgroundColor : valueOrDefault(dataset.backgroundColor, index, elementOpts.backgroundColor);\r\n\t\t\tmodel.borderColor = custom.borderColor ? custom.borderColor : valueOrDefault(dataset.borderColor, index, elementOpts.borderColor);\r\n\t\t\tmodel.borderWidth = custom.borderWidth ? custom.borderWidth : valueOrDefault(dataset.borderWidth, index, elementOpts.borderWidth);\r\n\t\t},\r\n\r\n\t\tsetHoverStyle: function(element) {\r\n\t\t\tvar dataset = this.chart.data.datasets[element._datasetIndex],\r\n\t\t\t\tindex = element._index,\r\n\t\t\t\tcustom = element.custom || {},\r\n\t\t\t\tvalueOrDefault = helpers.getValueAtIndexOrDefault,\r\n\t\t\t\tgetHoverColor = helpers.getHoverColor,\r\n\t\t\t\tmodel = element._model;\r\n\r\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : valueOrDefault(dataset.hoverBackgroundColor, index, getHoverColor(model.backgroundColor));\r\n\t\t\tmodel.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : valueOrDefault(dataset.hoverBorderColor, index, getHoverColor(model.borderColor));\r\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : valueOrDefault(dataset.hoverBorderWidth, index, model.borderWidth);\r\n\t\t}\r\n\t\t\r\n    });\r\n\t\r\n\r\n\tChart.DatasetController.extend = helpers.inherits;\r\n};\r\n},{}],25:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n  var helpers = Chart.helpers;\r\n\r\n  Chart.elements = {};\r\n\r\n  Chart.Element = function(configuration) {\r\n    helpers.extend(this, configuration);\r\n    this.initialize.apply(this, arguments);\r\n  };\r\n\r\n  helpers.extend(Chart.Element.prototype, {\r\n\r\n    initialize: function() {\r\n      this.hidden = false;\r\n    },\r\n\r\n    pivot: function() {\r\n      var me = this;\r\n      if (!me._view) {\r\n        me._view = helpers.clone(me._model);\r\n      }\r\n      me._start = helpers.clone(me._view);\r\n      return me;\r\n    },\r\n\r\n    transition: function(ease) {\r\n      var me = this;\r\n      \r\n      if (!me._view) {\r\n        me._view = helpers.clone(me._model);\r\n      }\r\n\r\n      // No animation -> No Transition\r\n      if (ease === 1) {\r\n        me._view = me._model;\r\n        me._start = null;\r\n        return me;\r\n      }\r\n\r\n      if (!me._start) {\r\n        me.pivot();\r\n      }\r\n\r\n      helpers.each(me._model, function(value, key) {\r\n\r\n        if (key[0] === '_') {\r\n          // Only non-underscored properties\r\n        }\r\n\r\n        // Init if doesn't exist\r\n        else if (!me._view.hasOwnProperty(key)) {\r\n          if (typeof value === 'number' && !isNaN(me._view[key])) {\r\n            me._view[key] = value * ease;\r\n          } else {\r\n            me._view[key] = value;\r\n          }\r\n        }\r\n\r\n        // No unnecessary computations\r\n        else if (value === me._view[key]) {\r\n          // It's the same! Woohoo!\r\n        }\r\n\r\n        // Color transitions if possible\r\n        else if (typeof value === 'string') {\r\n          try {\r\n            var color = helpers.color(me._model[key]).mix(helpers.color(me._start[key]), ease);\r\n            me._view[key] = color.rgbString();\r\n          } catch (err) {\r\n            me._view[key] = value;\r\n          }\r\n        }\r\n        // Number transitions\r\n        else if (typeof value === 'number') {\r\n          var startVal = me._start[key] !== undefined && isNaN(me._start[key]) === false ? me._start[key] : 0;\r\n          me._view[key] = ((me._model[key] - startVal) * ease) + startVal;\r\n        }\r\n        // Everything else\r\n        else {\r\n          me._view[key] = value;\r\n        }\r\n      }, me);\r\n\r\n      return me;\r\n    },\r\n\r\n    tooltipPosition: function() {\r\n      return {\r\n        x: this._model.x,\r\n        y: this._model.y\r\n      };\r\n    },\r\n\r\n    hasValue: function() {\r\n      return helpers.isNumber(this._model.x) && helpers.isNumber(this._model.y);\r\n    }\r\n  });\r\n\r\n  Chart.Element.extend = helpers.inherits;\r\n\r\n};\r\n\r\n},{}],26:[function(require,module,exports){\r\n/*global window: false */\r\n/*global document: false */\r\n\"use strict\";\r\n\r\nvar color = require(2);\r\n\r\nmodule.exports = function(Chart) {\r\n\t//Global Chart helpers object for utility methods and classes\r\n\tvar helpers = Chart.helpers = {};\r\n\r\n\t//-- Basic js utility methods\r\n\thelpers.each = function(loopable, callback, self, reverse) {\r\n\t\t// Check to see if null or undefined firstly.\r\n\t\tvar i, len;\r\n\t\tif (helpers.isArray(loopable)) {\r\n\t\t\tlen = loopable.length;\r\n\t\t\tif (reverse) {\r\n\t\t\t\tfor (i = len - 1; i >= 0; i--) {\r\n\t\t\t\t\tcallback.call(self, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\t\tcallback.call(self, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (typeof loopable === 'object') {\r\n\t\t\tvar keys = Object.keys(loopable);\r\n\t\t\tlen = keys.length;\r\n\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\tcallback.call(self, loopable[keys[i]], keys[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers.clone = function(obj) {\r\n\t\tvar objClone = {};\r\n\t\thelpers.each(obj, function(value, key) {\r\n\t\t\tif (helpers.isArray(value)) {\r\n\t\t\t\tobjClone[key] = value.slice(0);\r\n\t\t\t} else if (typeof value === 'object' && value !== null) {\r\n\t\t\t\tobjClone[key] = helpers.clone(value);\r\n\t\t\t} else {\r\n\t\t\t\tobjClone[key] = value;\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn objClone;\r\n\t};\r\n\thelpers.extend = function(base) {\r\n\t\tvar setFn = function(value, key) { base[key] = value; };\r\n\t\tfor (var i = 1, ilen = arguments.length; i < ilen; i++) {\r\n\t\t\thelpers.each(arguments[i], setFn);\r\n\t\t}\r\n\t\treturn base;\r\n\t};\r\n\t// Need a special merge function to chart configs since they are now grouped\r\n\thelpers.configMerge = function(_base) {\r\n\t\tvar base = helpers.clone(_base);\r\n\t\thelpers.each(Array.prototype.slice.call(arguments, 1), function(extension) {\r\n\t\t\thelpers.each(extension, function(value, key) {\r\n\t\t\t\tif (key === 'scales') {\r\n\t\t\t\t\t// Scale config merging is complex. Add out own function here for that\r\n\t\t\t\t\tbase[key] = helpers.scaleMerge(base.hasOwnProperty(key) ? base[key] : {}, value);\r\n\r\n\t\t\t\t} else if (key === 'scale') {\r\n\t\t\t\t\t// Used in polar area & radar charts since there is only one scale\r\n\t\t\t\t\tbase[key] = helpers.configMerge(base.hasOwnProperty(key) ? base[key] : {}, Chart.scaleService.getScaleDefaults(value.type), value);\r\n\t\t\t\t} else if (base.hasOwnProperty(key) && helpers.isArray(base[key]) && helpers.isArray(value)) {\r\n\t\t\t\t\t// In this case we have an array of objects replacing another array. Rather than doing a strict replace,\r\n\t\t\t\t\t// merge. This allows easy scale option merging\r\n\t\t\t\t\tvar baseArray = base[key];\r\n\r\n\t\t\t\t\thelpers.each(value, function(valueObj, index) {\r\n\r\n\t\t\t\t\t\tif (index < baseArray.length) {\r\n\t\t\t\t\t\t\tif (typeof baseArray[index] === 'object' && baseArray[index] !== null && typeof valueObj === 'object' && valueObj !== null) {\r\n\t\t\t\t\t\t\t\t// Two objects are coming together. Do a merge of them.\r\n\t\t\t\t\t\t\t\tbaseArray[index] = helpers.configMerge(baseArray[index], valueObj);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Just overwrite in this case since there is nothing to merge\r\n\t\t\t\t\t\t\t\tbaseArray[index] = valueObj;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbaseArray.push(valueObj); // nothing to merge\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t} else if (base.hasOwnProperty(key) && typeof base[key] === \"object\" && base[key] !== null && typeof value === \"object\") {\r\n\t\t\t\t\t// If we are overwriting an object with an object, do a merge of the properties.\r\n\t\t\t\t\tbase[key] = helpers.configMerge(base[key], value);\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// can just overwrite the value in this case\r\n\t\t\t\t\tbase[key] = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\treturn base;\r\n\t};\r\n\thelpers.scaleMerge = function(_base, extension) {\r\n\t\tvar base = helpers.clone(_base);\r\n\r\n\t\thelpers.each(extension, function(value, key) {\r\n\t\t\tif (key === 'xAxes' || key === 'yAxes') {\r\n\t\t\t\t// These properties are arrays of items\r\n\t\t\t\tif (base.hasOwnProperty(key)) {\r\n\t\t\t\t\thelpers.each(value, function(valueObj, index) {\r\n\t\t\t\t\t\tvar axisType = helpers.getValueOrDefault(valueObj.type, key === 'xAxes' ? 'category' : 'linear');\r\n\t\t\t\t\t\tvar axisDefaults = Chart.scaleService.getScaleDefaults(axisType);\r\n\t\t\t\t\t\tif (index >= base[key].length || !base[key][index].type) {\r\n\t\t\t\t\t\t\tbase[key].push(helpers.configMerge(axisDefaults, valueObj));\r\n\t\t\t\t\t\t} else if (valueObj.type && valueObj.type !== base[key][index].type) {\r\n\t\t\t\t\t\t\t// Type changed. Bring in the new defaults before we bring in valueObj so that valueObj can override the correct scale defaults\r\n\t\t\t\t\t\t\tbase[key][index] = helpers.configMerge(base[key][index], axisDefaults, valueObj);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Type is the same\r\n\t\t\t\t\t\t\tbase[key][index] = helpers.configMerge(base[key][index], valueObj);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbase[key] = [];\r\n\t\t\t\t\thelpers.each(value, function(valueObj) {\r\n\t\t\t\t\t\tvar axisType = helpers.getValueOrDefault(valueObj.type, key === 'xAxes' ? 'category' : 'linear');\r\n\t\t\t\t\t\tbase[key].push(helpers.configMerge(Chart.scaleService.getScaleDefaults(axisType), valueObj));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else if (base.hasOwnProperty(key) && typeof base[key] === \"object\" && base[key] !== null && typeof value === \"object\") {\r\n\t\t\t\t// If we are overwriting an object with an object, do a merge of the properties.\r\n\t\t\t\tbase[key] = helpers.configMerge(base[key], value);\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// can just overwrite the value in this case\r\n\t\t\t\tbase[key] = value;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn base;\r\n\t};\r\n\thelpers.getValueAtIndexOrDefault = function(value, index, defaultValue) {\r\n\t\tif (value === undefined || value === null) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\r\n\t\tif (helpers.isArray(value)) {\r\n\t\t\treturn index < value.length ? value[index] : defaultValue;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t};\r\n\thelpers.getValueOrDefault = function(value, defaultValue) {\r\n\t\treturn value === undefined ? defaultValue : value;\r\n\t};\r\n\thelpers.indexOf = Array.prototype.indexOf?\r\n\t\tfunction(array, item) { return array.indexOf(item); } :\r\n\t\tfunction(array, item) {\r\n\t\t\tfor (var i = 0, ilen = array.length; i < ilen; ++i) {\r\n\t\t\t\tif (array[i] === item) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t};\r\n\thelpers.where = function(collection, filterCallback) {\r\n\t\tif (helpers.isArray(collection) && Array.prototype.filter) {\r\n\t\t\treturn collection.filter(filterCallback);\r\n\t\t} else {\r\n\t\t\tvar filtered = [];\r\n\r\n\t\t\thelpers.each(collection, function(item) {\r\n\t\t\t\tif (filterCallback(item)) {\r\n\t\t\t\t\tfiltered.push(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn filtered;\r\n\t\t}\r\n\t};\r\n\thelpers.findIndex = Array.prototype.findIndex?\r\n\t\tfunction(array, callback, scope) { return array.findIndex(callback, scope); } :\r\n\t\tfunction(array, callback, scope) {\r\n\t\t\tscope = scope === undefined? array : scope;\r\n\t\t\tfor (var i = 0, ilen = array.length; i < ilen; ++i) {\r\n\t\t\t\tif (callback.call(scope, array[i], i, array)) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t};\r\n\thelpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex) {\r\n\t\t// Default to start of the array\r\n\t\tif (startIndex === undefined || startIndex === null) {\r\n\t\t\tstartIndex = -1;\r\n\t\t}\r\n\t\tfor (var i = startIndex + 1; i < arrayToSearch.length; i++) {\r\n\t\t\tvar currentItem = arrayToSearch[i];\r\n\t\t\tif (filterCallback(currentItem)) {\r\n\t\t\t\treturn currentItem;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) {\r\n\t\t// Default to end of the array\r\n\t\tif (startIndex === undefined || startIndex === null) {\r\n\t\t\tstartIndex = arrayToSearch.length;\r\n\t\t}\r\n\t\tfor (var i = startIndex - 1; i >= 0; i--) {\r\n\t\t\tvar currentItem = arrayToSearch[i];\r\n\t\t\tif (filterCallback(currentItem)) {\r\n\t\t\t\treturn currentItem;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers.inherits = function(extensions) {\r\n\t\t//Basic javascript inheritance based on the model created in Backbone.js\r\n\t\tvar parent = this;\r\n\t\tvar ChartElement = (extensions && extensions.hasOwnProperty(\"constructor\")) ? extensions.constructor : function() {\r\n\t\t\treturn parent.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tvar Surrogate = function() {\r\n\t\t\tthis.constructor = ChartElement;\r\n\t\t};\r\n\t\tSurrogate.prototype = parent.prototype;\r\n\t\tChartElement.prototype = new Surrogate();\r\n\r\n\t\tChartElement.extend = helpers.inherits;\r\n\r\n\t\tif (extensions) {\r\n\t\t\thelpers.extend(ChartElement.prototype, extensions);\r\n\t\t}\r\n\r\n\t\tChartElement.__super__ = parent.prototype;\r\n\r\n\t\treturn ChartElement;\r\n\t};\r\n\thelpers.noop = function() {};\r\n\thelpers.uid = (function() {\r\n\t\tvar id = 0;\r\n\t\treturn function() {\r\n\t\t\treturn id++;\r\n\t\t};\r\n\t})();\r\n\t//-- Math methods\r\n\thelpers.isNumber = function(n) {\r\n\t\treturn !isNaN(parseFloat(n)) && isFinite(n);\r\n\t};\r\n\thelpers.almostEquals = function(x, y, epsilon) {\r\n\t\treturn Math.abs(x - y) < epsilon;\r\n\t};\r\n\thelpers.max = function(array) {\r\n\t\treturn array.reduce(function(max, value) {\r\n\t\t\tif (!isNaN(value)) {\r\n\t\t\t\treturn Math.max(max, value);\r\n\t\t\t} else {\r\n\t\t\t\treturn max;\r\n\t\t\t}\r\n\t\t}, Number.NEGATIVE_INFINITY);\r\n\t};\r\n\thelpers.min = function(array) {\r\n\t\treturn array.reduce(function(min, value) {\r\n\t\t\tif (!isNaN(value)) {\r\n\t\t\t\treturn Math.min(min, value);\r\n\t\t\t} else {\r\n\t\t\t\treturn min;\r\n\t\t\t}\r\n\t\t}, Number.POSITIVE_INFINITY);\r\n\t};\r\n\thelpers.sign = Math.sign?\r\n\t\tfunction(x) { return Math.sign(x); } :\r\n\t\tfunction(x) {\r\n\t\t\tx = +x; // convert to a number\r\n\t\t\tif (x === 0 || isNaN(x)) {\r\n\t\t\t\treturn x;\r\n\t\t\t}\r\n\t\t\treturn x > 0 ? 1 : -1;\r\n\t\t};\r\n\thelpers.log10 = Math.log10?\r\n\t\tfunction(x) { return Math.log10(x); } :\r\n\t\tfunction(x) {\r\n\t\t\treturn Math.log(x) / Math.LN10;\r\n\t\t};\r\n\thelpers.toRadians = function(degrees) {\r\n\t\treturn degrees * (Math.PI / 180);\r\n\t};\r\n\thelpers.toDegrees = function(radians) {\r\n\t\treturn radians * (180 / Math.PI);\r\n\t};\r\n\t// Gets the angle from vertical upright to the point about a centre.\r\n\thelpers.getAngleFromPoint = function(centrePoint, anglePoint) {\r\n\t\tvar distanceFromXCenter = anglePoint.x - centrePoint.x,\r\n\t\t\tdistanceFromYCenter = anglePoint.y - centrePoint.y,\r\n\t\t\tradialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\r\n\r\n\t\tvar angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\r\n\r\n\t\tif (angle < (-0.5 * Math.PI)) {\r\n\t\t\tangle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tangle: angle,\r\n\t\t\tdistance: radialDistanceFromCenter\r\n\t\t};\r\n\t};\r\n\thelpers.aliasPixel = function(pixelWidth) {\r\n\t\treturn (pixelWidth % 2 === 0) ? 0 : 0.5;\r\n\t};\r\n\thelpers.splineCurve = function(firstPoint, middlePoint, afterPoint, t) {\r\n\t\t//Props to Rob Spencer at scaled innovation for his post on splining between points\r\n\t\t//http://scaledinnovation.com/analytics/splines/aboutSplines.html\r\n\r\n\t\t// This function must also respect \"skipped\" points\r\n\r\n\t\tvar previous = firstPoint.skip ? middlePoint : firstPoint,\r\n\t\t\tcurrent = middlePoint,\r\n\t\t\tnext = afterPoint.skip ? middlePoint : afterPoint;\r\n\r\n\t\tvar d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));\r\n\t\tvar d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));\r\n\r\n\t\tvar s01 = d01 / (d01 + d12);\r\n\t\tvar s12 = d12 / (d01 + d12);\r\n\r\n\t\t// If all points are the same, s01 & s02 will be inf\r\n\t\ts01 = isNaN(s01) ? 0 : s01;\r\n\t\ts12 = isNaN(s12) ? 0 : s12;\r\n\r\n\t\tvar fa = t * s01; // scaling factor for triangle Ta\r\n\t\tvar fb = t * s12;\r\n\r\n\t\treturn {\r\n\t\t\tprevious: {\r\n\t\t\t\tx: current.x - fa * (next.x - previous.x),\r\n\t\t\t\ty: current.y - fa * (next.y - previous.y)\r\n\t\t\t},\r\n\t\t\tnext: {\r\n\t\t\t\tx: current.x + fb * (next.x - previous.x),\r\n\t\t\t\ty: current.y + fb * (next.y - previous.y)\r\n\t\t\t}\r\n\t\t};\r\n\t};\r\n\thelpers.EPSILON = Number.EPSILON || 1e-14;\r\n\thelpers.splineCurveMonotone = function(points) {\r\n\t\t// This function calculates Bézier control points in a similar way than |splineCurve|,\r\n\t\t// but preserves monotonicity of the provided data and ensures no local extremums are added\r\n\t\t// between the dataset discrete points due to the interpolation.\r\n\t\t// See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\r\n\r\n\t\tvar pointsWithTangents = (points || []).map(function(point) {\r\n\t\t\treturn {\r\n\t\t\t\tmodel: point._model,\r\n\t\t\t\tdeltaK: 0,\r\n\t\t\t\tmK: 0\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\t// Calculate slopes (deltaK) and initialize tangents (mK)\r\n\t\tvar pointsLen = pointsWithTangents.length;\r\n\t\tvar i, pointBefore, pointCurrent, pointAfter;\r\n\t\tfor (i = 0; i < pointsLen; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tif (pointCurrent.model.skip) continue;\r\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\r\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\r\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\r\n\t\t\t\tpointCurrent.deltaK = (pointAfter.model.y - pointCurrent.model.y) / (pointAfter.model.x - pointCurrent.model.x);\r\n\t\t\t}\r\n\t\t\tif (!pointBefore || pointBefore.model.skip) pointCurrent.mK = pointCurrent.deltaK;\r\n\t\t\telse if (!pointAfter || pointAfter.model.skip) pointCurrent.mK = pointBefore.deltaK;\r\n\t\t\telse if (this.sign(pointBefore.deltaK) != this.sign(pointCurrent.deltaK)) pointCurrent.mK = 0;\r\n\t\t\telse pointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2;\r\n\t\t}\r\n\r\n\t\t// Adjust tangents to ensure monotonic properties\r\n\t\tvar alphaK, betaK, tauK, squaredMagnitude;\r\n\t\tfor (i = 0; i < pointsLen - 1; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tpointAfter = pointsWithTangents[i + 1];\r\n\t\t\tif (pointCurrent.model.skip || pointAfter.model.skip) continue;\r\n\t\t\tif (helpers.almostEquals(pointCurrent.deltaK, 0, this.EPSILON))\r\n\t\t\t{\r\n\t\t\t\tpointCurrent.mK = pointAfter.mK = 0;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\talphaK = pointCurrent.mK / pointCurrent.deltaK;\r\n\t\t\tbetaK = pointAfter.mK / pointCurrent.deltaK;\r\n\t\t\tsquaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\r\n\t\t\tif (squaredMagnitude <= 9) continue;\r\n\t\t\ttauK = 3 / Math.sqrt(squaredMagnitude);\r\n\t\t\tpointCurrent.mK = alphaK * tauK * pointCurrent.deltaK;\r\n\t\t\tpointAfter.mK = betaK  * tauK * pointCurrent.deltaK;\r\n\t\t}\r\n\r\n\t\t// Compute control points\r\n\t\tvar deltaX;\r\n\t\tfor (i = 0; i < pointsLen; ++i) {\r\n\t\t\tpointCurrent = pointsWithTangents[i];\r\n\t\t\tif (pointCurrent.model.skip) continue;\r\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\r\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\r\n\t\t\tif (pointBefore && !pointBefore.model.skip) {\r\n\t\t\t\tdeltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;\r\n\t\t\t\tpointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;\r\n\t\t\t\tpointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;\r\n\t\t\t}\r\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\r\n\t\t\t\tdeltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;\r\n\t\t\t\tpointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;\r\n\t\t\t\tpointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\thelpers.nextItem = function(collection, index, loop) {\r\n\t\tif (loop) {\r\n\t\t\treturn index >= collection.length - 1 ? collection[0] : collection[index + 1];\r\n\t\t}\r\n\r\n\t\treturn index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1];\r\n\t};\r\n\thelpers.previousItem = function(collection, index, loop) {\r\n\t\tif (loop) {\r\n\t\t\treturn index <= 0 ? collection[collection.length - 1] : collection[index - 1];\r\n\t\t}\r\n\t\treturn index <= 0 ? collection[0] : collection[index - 1];\r\n\t};\r\n\t// Implementation of the nice number algorithm used in determining where axis labels will go\r\n\thelpers.niceNum = function(range, round) {\r\n\t\tvar exponent = Math.floor(helpers.log10(range));\r\n\t\tvar fraction = range / Math.pow(10, exponent);\r\n\t\tvar niceFraction;\r\n\r\n\t\tif (round) {\r\n\t\t\tif (fraction < 1.5) {\r\n\t\t\t\tniceFraction = 1;\r\n\t\t\t} else if (fraction < 3) {\r\n\t\t\t\tniceFraction = 2;\r\n\t\t\t} else if (fraction < 7) {\r\n\t\t\t\tniceFraction = 5;\r\n\t\t\t} else {\r\n\t\t\t\tniceFraction = 10;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (fraction <= 1.0) {\r\n\t\t\t\tniceFraction = 1;\r\n\t\t\t} else if (fraction <= 2) {\r\n\t\t\t\tniceFraction = 2;\r\n\t\t\t} else if (fraction <= 5) {\r\n\t\t\t\tniceFraction = 5;\r\n\t\t\t} else {\r\n\t\t\t\tniceFraction = 10;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn niceFraction * Math.pow(10, exponent);\r\n\t};\r\n\t//Easing functions adapted from Robert Penner's easing equations\r\n\t//http://www.robertpenner.com/easing/\r\n\tvar easingEffects = helpers.easingEffects = {\r\n\t\tlinear: function(t) {\r\n\t\t\treturn t;\r\n\t\t},\r\n\t\teaseInQuad: function(t) {\r\n\t\t\treturn t * t;\r\n\t\t},\r\n\t\teaseOutQuad: function(t) {\r\n\t\t\treturn -1 * t * (t - 2);\r\n\t\t},\r\n\t\teaseInOutQuad: function(t) {\r\n\t\t\tif ((t /= 1 / 2) < 1) {\r\n\t\t\t\treturn 1 / 2 * t * t;\r\n\t\t\t}\r\n\t\t\treturn -1 / 2 * ((--t) * (t - 2) - 1);\r\n\t\t},\r\n\t\teaseInCubic: function(t) {\r\n\t\t\treturn t * t * t;\r\n\t\t},\r\n\t\teaseOutCubic: function(t) {\r\n\t\t\treturn 1 * ((t = t / 1 - 1) * t * t + 1);\r\n\t\t},\r\n\t\teaseInOutCubic: function(t) {\r\n\t\t\tif ((t /= 1 / 2) < 1) {\r\n\t\t\t\treturn 1 / 2 * t * t * t;\r\n\t\t\t}\r\n\t\t\treturn 1 / 2 * ((t -= 2) * t * t + 2);\r\n\t\t},\r\n\t\teaseInQuart: function(t) {\r\n\t\t\treturn t * t * t * t;\r\n\t\t},\r\n\t\teaseOutQuart: function(t) {\r\n\t\t\treturn -1 * ((t = t / 1 - 1) * t * t * t - 1);\r\n\t\t},\r\n\t\teaseInOutQuart: function(t) {\r\n\t\t\tif ((t /= 1 / 2) < 1) {\r\n\t\t\t\treturn 1 / 2 * t * t * t * t;\r\n\t\t\t}\r\n\t\t\treturn -1 / 2 * ((t -= 2) * t * t * t - 2);\r\n\t\t},\r\n\t\teaseInQuint: function(t) {\r\n\t\t\treturn 1 * (t /= 1) * t * t * t * t;\r\n\t\t},\r\n\t\teaseOutQuint: function(t) {\r\n\t\t\treturn 1 * ((t = t / 1 - 1) * t * t * t * t + 1);\r\n\t\t},\r\n\t\teaseInOutQuint: function(t) {\r\n\t\t\tif ((t /= 1 / 2) < 1) {\r\n\t\t\t\treturn 1 / 2 * t * t * t * t * t;\r\n\t\t\t}\r\n\t\t\treturn 1 / 2 * ((t -= 2) * t * t * t * t + 2);\r\n\t\t},\r\n\t\teaseInSine: function(t) {\r\n\t\t\treturn -1 * Math.cos(t / 1 * (Math.PI / 2)) + 1;\r\n\t\t},\r\n\t\teaseOutSine: function(t) {\r\n\t\t\treturn 1 * Math.sin(t / 1 * (Math.PI / 2));\r\n\t\t},\r\n\t\teaseInOutSine: function(t) {\r\n\t\t\treturn -1 / 2 * (Math.cos(Math.PI * t / 1) - 1);\r\n\t\t},\r\n\t\teaseInExpo: function(t) {\r\n\t\t\treturn (t === 0) ? 1 : 1 * Math.pow(2, 10 * (t / 1 - 1));\r\n\t\t},\r\n\t\teaseOutExpo: function(t) {\r\n\t\t\treturn (t === 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);\r\n\t\t},\r\n\t\teaseInOutExpo: function(t) {\r\n\t\t\tif (t === 0) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tif (t === 1) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif ((t /= 1 / 2) < 1) {\r\n\t\t\t\treturn 1 / 2 * Math.pow(2, 10 * (t - 1));\r\n\t\t\t}\r\n\t\t\treturn 1 / 2 * (-Math.pow(2, -10 * --t) + 2);\r\n\t\t},\r\n\t\teaseInCirc: function(t) {\r\n\t\t\tif (t >= 1) {\r\n\t\t\t\treturn t;\r\n\t\t\t}\r\n\t\t\treturn -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);\r\n\t\t},\r\n\t\teaseOutCirc: function(t) {\r\n\t\t\treturn 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);\r\n\t\t},\r\n\t\teaseInOutCirc: function(t) {\r\n\t\t\tif ((t /= 1 / 2) < 1) {\r\n\t\t\t\treturn -1 / 2 * (Math.sqrt(1 - t * t) - 1);\r\n\t\t\t}\r\n\t\t\treturn 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);\r\n\t\t},\r\n\t\teaseInElastic: function(t) {\r\n\t\t\tvar s = 1.70158;\r\n\t\t\tvar p = 0;\r\n\t\t\tvar a = 1;\r\n\t\t\tif (t === 0) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tif ((t /= 1) === 1) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif (!p) {\r\n\t\t\t\tp = 1 * 0.3;\r\n\t\t\t}\r\n\t\t\tif (a < Math.abs(1)) {\r\n\t\t\t\ta = 1;\r\n\t\t\t\ts = p / 4;\r\n\t\t\t} else {\r\n\t\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t\t}\r\n\t\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));\r\n\t\t},\r\n\t\teaseOutElastic: function(t) {\r\n\t\t\tvar s = 1.70158;\r\n\t\t\tvar p = 0;\r\n\t\t\tvar a = 1;\r\n\t\t\tif (t === 0) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tif ((t /= 1) === 1) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif (!p) {\r\n\t\t\t\tp = 1 * 0.3;\r\n\t\t\t}\r\n\t\t\tif (a < Math.abs(1)) {\r\n\t\t\t\ta = 1;\r\n\t\t\t\ts = p / 4;\r\n\t\t\t} else {\r\n\t\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t\t}\r\n\t\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;\r\n\t\t},\r\n\t\teaseInOutElastic: function(t) {\r\n\t\t\tvar s = 1.70158;\r\n\t\t\tvar p = 0;\r\n\t\t\tvar a = 1;\r\n\t\t\tif (t === 0) {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tif ((t /= 1 / 2) === 2) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\tif (!p) {\r\n\t\t\t\tp = 1 * (0.3 * 1.5);\r\n\t\t\t}\r\n\t\t\tif (a < Math.abs(1)) {\r\n\t\t\t\ta = 1;\r\n\t\t\t\ts = p / 4;\r\n\t\t\t} else {\r\n\t\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t\t}\r\n\t\t\tif (t < 1) {\r\n\t\t\t\treturn -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));\r\n\t\t\t}\r\n\t\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * 0.5 + 1;\r\n\t\t},\r\n\t\teaseInBack: function(t) {\r\n\t\t\tvar s = 1.70158;\r\n\t\t\treturn 1 * (t /= 1) * t * ((s + 1) * t - s);\r\n\t\t},\r\n\t\teaseOutBack: function(t) {\r\n\t\t\tvar s = 1.70158;\r\n\t\t\treturn 1 * ((t = t / 1 - 1) * t * ((s + 1) * t + s) + 1);\r\n\t\t},\r\n\t\teaseInOutBack: function(t) {\r\n\t\t\tvar s = 1.70158;\r\n\t\t\tif ((t /= 1 / 2) < 1) {\r\n\t\t\t\treturn 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));\r\n\t\t\t}\r\n\t\t\treturn 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\r\n\t\t},\r\n\t\teaseInBounce: function(t) {\r\n\t\t\treturn 1 - easingEffects.easeOutBounce(1 - t);\r\n\t\t},\r\n\t\teaseOutBounce: function(t) {\r\n\t\t\tif ((t /= 1) < (1 / 2.75)) {\r\n\t\t\t\treturn 1 * (7.5625 * t * t);\r\n\t\t\t} else if (t < (2 / 2.75)) {\r\n\t\t\t\treturn 1 * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75);\r\n\t\t\t} else if (t < (2.5 / 2.75)) {\r\n\t\t\t\treturn 1 * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375);\r\n\t\t\t} else {\r\n\t\t\t\treturn 1 * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375);\r\n\t\t\t}\r\n\t\t},\r\n\t\teaseInOutBounce: function(t) {\r\n\t\t\tif (t < 1 / 2) {\r\n\t\t\t\treturn easingEffects.easeInBounce(t * 2) * 0.5;\r\n\t\t\t}\r\n\t\t\treturn easingEffects.easeOutBounce(t * 2 - 1) * 0.5 + 1 * 0.5;\r\n\t\t}\r\n\t};\r\n\t//Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\thelpers.requestAnimFrame = (function() {\r\n\t\treturn window.requestAnimationFrame ||\r\n\t\t\twindow.webkitRequestAnimationFrame ||\r\n\t\t\twindow.mozRequestAnimationFrame ||\r\n\t\t\twindow.oRequestAnimationFrame ||\r\n\t\t\twindow.msRequestAnimationFrame ||\r\n\t\t\tfunction(callback) {\r\n\t\t\t\treturn window.setTimeout(callback, 1000 / 60);\r\n\t\t\t};\r\n\t})();\r\n\thelpers.cancelAnimFrame = (function() {\r\n\t\treturn window.cancelAnimationFrame ||\r\n\t\t\twindow.webkitCancelAnimationFrame ||\r\n\t\t\twindow.mozCancelAnimationFrame ||\r\n\t\t\twindow.oCancelAnimationFrame ||\r\n\t\t\twindow.msCancelAnimationFrame ||\r\n\t\t\tfunction(callback) {\r\n\t\t\t\treturn window.clearTimeout(callback, 1000 / 60);\r\n\t\t\t};\r\n\t})();\r\n\t//-- DOM methods\r\n\thelpers.getRelativePosition = function(evt, chart) {\r\n\t\tvar mouseX, mouseY;\r\n\t\tvar e = evt.originalEvent || evt,\r\n\t\t\tcanvas = evt.currentTarget || evt.srcElement,\r\n\t\t\tboundingRect = canvas.getBoundingClientRect();\r\n\r\n\t\tvar touches = e.touches;\r\n\t\tif (touches && touches.length > 0) {\r\n\t\t\tmouseX = touches[0].clientX;\r\n\t\t\tmouseY = touches[0].clientY;\r\n\r\n\t\t} else {\r\n\t\t\tmouseX = e.clientX;\r\n\t\t\tmouseY = e.clientY;\r\n\t\t}\r\n\r\n\t\t// Scale mouse coordinates into canvas coordinates\r\n\t\t// by following the pattern laid out by 'jerryj' in the comments of\r\n\t\t// http://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/\r\n\t\tvar paddingLeft = parseFloat(helpers.getStyle(canvas, 'padding-left'));\r\n\t\tvar paddingTop = parseFloat(helpers.getStyle(canvas, 'padding-top'));\r\n\t\tvar paddingRight = parseFloat(helpers.getStyle(canvas, 'padding-right'));\r\n\t\tvar paddingBottom = parseFloat(helpers.getStyle(canvas, 'padding-bottom'));\r\n\t\tvar width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight;\r\n\t\tvar height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom;\r\n\r\n\t\t// We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However\r\n\t\t// the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here\r\n\t\tmouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);\r\n\t\tmouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);\r\n\r\n\t\treturn {\r\n\t\t\tx: mouseX,\r\n\t\t\ty: mouseY\r\n\t\t};\r\n\r\n\t};\r\n\thelpers.addEvent = function(node, eventType, method) {\r\n\t\tif (node.addEventListener) {\r\n\t\t\tnode.addEventListener(eventType, method);\r\n\t\t} else if (node.attachEvent) {\r\n\t\t\tnode.attachEvent(\"on\" + eventType, method);\r\n\t\t} else {\r\n\t\t\tnode[\"on\" + eventType] = method;\r\n\t\t}\r\n\t};\r\n\thelpers.removeEvent = function(node, eventType, handler) {\r\n\t\tif (node.removeEventListener) {\r\n\t\t\tnode.removeEventListener(eventType, handler, false);\r\n\t\t} else if (node.detachEvent) {\r\n\t\t\tnode.detachEvent(\"on\" + eventType, handler);\r\n\t\t} else {\r\n\t\t\tnode[\"on\" + eventType] = helpers.noop;\r\n\t\t}\r\n\t};\r\n\thelpers.bindEvents = function(chartInstance, arrayOfEvents, handler) {\r\n\t\t// Create the events object if it's not already present\r\n\t\tvar events = chartInstance.events = chartInstance.events || {};\r\n\r\n\t\thelpers.each(arrayOfEvents, function(eventName) {\r\n\t\t\tevents[eventName] = function() {\r\n\t\t\t\thandler.apply(chartInstance, arguments);\r\n\t\t\t};\r\n\t\t\thelpers.addEvent(chartInstance.chart.canvas, eventName, events[eventName]);\r\n\t\t});\r\n\t};\r\n\thelpers.unbindEvents = function(chartInstance, arrayOfEvents) {\r\n\t\tvar canvas = chartInstance.chart.canvas;\r\n\t\thelpers.each(arrayOfEvents, function(handler, eventName) {\r\n\t\t\thelpers.removeEvent(canvas, eventName, handler);\r\n\t\t});\r\n\t};\r\n\r\n\t// Private helper function to convert max-width/max-height values that may be percentages into a number\r\n\tfunction parseMaxStyle(styleValue, node, parentProperty) {\r\n\t\tvar valueInPixels;\r\n\t\tif (typeof(styleValue) === 'string') {\r\n\t\t\tvalueInPixels = parseInt(styleValue, 10);\r\n\r\n\t\t\tif (styleValue.indexOf('%') != -1) {\r\n\t\t\t\t// percentage * size in dimension\r\n\t\t\t\tvalueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvalueInPixels = styleValue;\r\n\t\t}\r\n\r\n\t\treturn valueInPixels;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns if the given value contains an effective constraint.\r\n\t * @private\r\n\t */\r\n\tfunction isConstrainedValue(value) {\r\n\t\treturn value !== undefined &&  value !== null && value !== 'none';\r\n\t}\r\n\r\n\t// Private helper to get a constraint dimension\r\n\t// @param domNode : the node to check the constraint on\r\n\t// @param maxStyle : the style that defines the maximum for the direction we are using (maxWidth / maxHeight)\r\n\t// @param percentageProperty : property of parent to use when calculating width as a percentage\r\n\t// @see http://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser\r\n\tfunction getConstraintDimension(domNode, maxStyle, percentageProperty) {\r\n\t\tvar view = document.defaultView;\r\n\t\tvar parentNode = domNode.parentNode;\r\n\t\tvar constrainedNode = view.getComputedStyle(domNode)[maxStyle];\r\n\t\tvar constrainedContainer = view.getComputedStyle(parentNode)[maxStyle];\r\n\t\tvar hasCNode = isConstrainedValue(constrainedNode);\r\n\t\tvar hasCContainer = isConstrainedValue(constrainedContainer);\r\n\t\tvar infinity = Number.POSITIVE_INFINITY;\r\n\r\n\t\tif (hasCNode || hasCContainer) {\r\n\t\t\treturn Math.min(\r\n\t\t\t\thasCNode? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity,\r\n\t\t\t\thasCContainer? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity);\r\n\t\t}\r\n\r\n\t\treturn 'none';\r\n\t}\r\n\t// returns Number or undefined if no constraint\r\n\thelpers.getConstraintWidth = function(domNode) {\r\n\t\treturn getConstraintDimension(domNode, 'max-width', 'clientWidth');\r\n\t};\r\n\t// returns Number or undefined if no constraint\r\n\thelpers.getConstraintHeight = function(domNode) {\r\n\t\treturn getConstraintDimension(domNode, 'max-height', 'clientHeight');\r\n\t};\r\n\thelpers.getMaximumWidth = function(domNode) {\r\n\t\tvar container = domNode.parentNode;\r\n\t\tvar padding = parseInt(helpers.getStyle(container, 'padding-left')) + parseInt(helpers.getStyle(container, 'padding-right'));\r\n\t\tvar w = container.clientWidth - padding;\r\n\t\tvar cw = helpers.getConstraintWidth(domNode);\r\n\t\treturn isNaN(cw)? w : Math.min(w, cw);\r\n\t};\r\n\thelpers.getMaximumHeight = function(domNode) {\r\n\t\tvar container = domNode.parentNode;\r\n\t\tvar padding = parseInt(helpers.getStyle(container, 'padding-top')) + parseInt(helpers.getStyle(container, 'padding-bottom'));\r\n\t\tvar h = container.clientHeight - padding;\r\n\t\tvar ch = helpers.getConstraintHeight(domNode);\r\n\t\treturn isNaN(ch)? h : Math.min(h, ch);\r\n\t};\r\n\thelpers.getStyle = function(el, property) {\r\n\t\treturn el.currentStyle ?\r\n\t\t\tel.currentStyle[property] :\r\n\t\t\tdocument.defaultView.getComputedStyle(el, null).getPropertyValue(property);\r\n\t};\r\n\thelpers.retinaScale = function(chart) {\r\n\t\tvar ctx = chart.ctx;\r\n\t\tvar canvas = chart.canvas;\r\n\t\tvar width = canvas.width;\r\n\t\tvar height = canvas.height;\r\n\t\tvar pixelRatio = chart.currentDevicePixelRatio = window.devicePixelRatio || 1;\r\n\r\n\t\tif (pixelRatio !== 1) {\r\n\t\t\tcanvas.height = height * pixelRatio;\r\n\t\t\tcanvas.width = width * pixelRatio;\r\n\t\t\tctx.scale(pixelRatio, pixelRatio);\r\n\r\n\t\t\t// Store the device pixel ratio so that we can go backwards in `destroy`.\r\n\t\t\t// The devicePixelRatio changes with zoom, so there are no guarantees that it is the same\r\n\t\t\t// when destroy is called\r\n\t\t\tchart.originalDevicePixelRatio = chart.originalDevicePixelRatio || pixelRatio;\r\n\t\t}\r\n\r\n\t\tcanvas.style.width = width + 'px';\r\n\t\tcanvas.style.height = height + 'px';\r\n\t};\r\n\t//-- Canvas methods\r\n\thelpers.clear = function(chart) {\r\n\t\tchart.ctx.clearRect(0, 0, chart.width, chart.height);\r\n\t};\r\n\thelpers.fontString = function(pixelSize, fontStyle, fontFamily) {\r\n\t\treturn fontStyle + \" \" + pixelSize + \"px \" + fontFamily;\r\n\t};\r\n\thelpers.longestText = function(ctx, font, arrayOfThings, cache) {\r\n\t\tcache = cache || {};\r\n\t\tvar data = cache.data = cache.data || {};\r\n\t\tvar gc = cache.garbageCollect = cache.garbageCollect || [];\r\n\r\n\t\tif (cache.font !== font) {\r\n\t\t\tdata = cache.data = {};\r\n\t\t\tgc = cache.garbageCollect = [];\r\n\t\t\tcache.font = font;\r\n\t\t}\r\n\r\n\t\tctx.font = font;\r\n\t\tvar longest = 0;\r\n\t\thelpers.each(arrayOfThings, function(thing) {\r\n\t\t\t// Undefined strings and arrays should not be measured\r\n\t\t\tif (thing !== undefined && thing !== null && helpers.isArray(thing) !== true) {\r\n\t\t\t\tlongest = helpers.measureText(ctx, data, gc, longest, thing);\r\n\t\t\t} else if (helpers.isArray(thing)) {\r\n\t\t\t\t// if it is an array lets measure each element\r\n\t\t\t\t// to do maybe simplify this function a bit so we can do this more recursively?\r\n\t\t\t\thelpers.each(thing, function(nestedThing) {\r\n\t\t\t\t\t// Undefined strings and arrays should not be measured\r\n\t\t\t\t\tif (nestedThing !== undefined && nestedThing !== null && !helpers.isArray(nestedThing)) {\r\n\t\t\t\t\t\tlongest = helpers.measureText(ctx, data, gc, longest, nestedThing);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar gcLen = gc.length / 2;\r\n\t\tif (gcLen > arrayOfThings.length) {\r\n\t\t\tfor (var i = 0; i < gcLen; i++) {\r\n\t\t\t\tdelete data[gc[i]];\r\n\t\t\t}\r\n\t\t\tgc.splice(0, gcLen);\r\n\t\t}\r\n\t\treturn longest;\r\n\t};\r\n\thelpers.measureText = function (ctx, data, gc, longest, string) {\r\n\t\tvar textWidth = data[string];\r\n\t\tif (!textWidth) {\r\n\t\t\ttextWidth = data[string] = ctx.measureText(string).width;\r\n\t\t\tgc.push(string);\r\n\t\t}\r\n\t\tif (textWidth > longest) {\r\n\t\t\tlongest = textWidth;\r\n\t\t}\r\n\t\treturn longest;\r\n\t};\r\n\thelpers.numberOfLabelLines = function(arrayOfThings) {\r\n\t\tvar numberOfLines = 1;\r\n\t\thelpers.each(arrayOfThings, function(thing) {\r\n\t\t\tif (helpers.isArray(thing)) {\r\n\t\t\t\tif (thing.length > numberOfLines) {\r\n\t\t\t\t\tnumberOfLines = thing.length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn numberOfLines;\r\n\t};\r\n\thelpers.drawRoundedRectangle = function(ctx, x, y, width, height, radius) {\r\n\t\tctx.beginPath();\r\n\t\tctx.moveTo(x + radius, y);\r\n\t\tctx.lineTo(x + width - radius, y);\r\n\t\tctx.quadraticCurveTo(x + width, y, x + width, y + radius);\r\n\t\tctx.lineTo(x + width, y + height - radius);\r\n\t\tctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\r\n\t\tctx.lineTo(x + radius, y + height);\r\n\t\tctx.quadraticCurveTo(x, y + height, x, y + height - radius);\r\n\t\tctx.lineTo(x, y + radius);\r\n\t\tctx.quadraticCurveTo(x, y, x + radius, y);\r\n\t\tctx.closePath();\r\n\t};\r\n\thelpers.color = function(c) {\r\n\t\tif (!color) {\r\n\t\t\tconsole.log('Color.js not found!');\r\n\t\t\treturn c;\r\n\t\t}\r\n\r\n\t\t/* global CanvasGradient */\r\n\t\tif (c instanceof CanvasGradient) {\r\n\t\t\treturn color(Chart.defaults.global.defaultColor);\r\n\t\t}\r\n\r\n\t\treturn color(c);\r\n\t};\r\n\thelpers.addResizeListener = function(node, callback) {\r\n\t\t// Hide an iframe before the node\r\n\t\tvar hiddenIframe = document.createElement('iframe');\r\n\t\tvar hiddenIframeClass = 'chartjs-hidden-iframe';\r\n\r\n\t\tif (hiddenIframe.classlist) {\r\n\t\t\t// can use classlist\r\n\t\t\thiddenIframe.classlist.add(hiddenIframeClass);\r\n\t\t} else {\r\n\t\t\thiddenIframe.setAttribute('class', hiddenIframeClass);\r\n\t\t}\r\n\r\n\t\t// Set the style\r\n\t\thiddenIframe.tabIndex = -1;\r\n\t\tvar style = hiddenIframe.style;\r\n\t\tstyle.width = '100%';\r\n\t\tstyle.display = 'block';\r\n\t\tstyle.border = 0;\r\n\t\tstyle.height = 0;\r\n\t\tstyle.margin = 0;\r\n\t\tstyle.position = 'absolute';\r\n\t\tstyle.left = 0;\r\n\t\tstyle.right = 0;\r\n\t\tstyle.top = 0;\r\n\t\tstyle.bottom = 0;\r\n\r\n\t\t// Insert the iframe so that contentWindow is available\r\n\t\tnode.insertBefore(hiddenIframe, node.firstChild);\r\n\r\n\t\t(hiddenIframe.contentWindow || hiddenIframe).onresize = function() {\r\n\t\t\tif (callback) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t};\r\n\thelpers.removeResizeListener = function(node) {\r\n\t\tvar hiddenIframe = node.querySelector('.chartjs-hidden-iframe');\r\n\r\n\t\t// Remove the resize detect iframe\r\n\t\tif (hiddenIframe) {\r\n\t\t\thiddenIframe.parentNode.removeChild(hiddenIframe);\r\n\t\t}\r\n\t};\r\n\thelpers.isArray = Array.isArray?\r\n\t\tfunction(obj) { return Array.isArray(obj); } :\r\n\t\tfunction(obj) {\r\n\t\t\treturn Object.prototype.toString.call(obj) === '[object Array]';\r\n\t\t};\r\n\t//! @see http://stackoverflow.com/a/14853974\r\n\thelpers.arrayEquals = function(a0, a1) {\r\n\t\tvar i, ilen, v0, v1;\r\n\r\n\t\tif (!a0 || !a1 || a0.length != a1.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen=a0.length; i < ilen; ++i) {\r\n\t\t\tv0 = a0[i];\r\n\t\t\tv1 = a1[i];\r\n\r\n\t\t\tif (v0 instanceof Array && v1 instanceof Array) {\r\n\t\t\t\tif (!helpers.arrayEquals(v0, v1)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (v0 != v1) {\r\n\t\t\t\t// NOTE: two different object instances will never be equal: {x:20} != {x:20}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t};\r\n\thelpers.callCallback = function(fn, args, _tArg) {\r\n\t\tif (fn && typeof fn.call === 'function') {\r\n\t\t\tfn.apply(_tArg, args);\r\n\t\t}\r\n\t};\r\n\thelpers.getHoverColor = function(color) {\r\n\t\t/* global CanvasPattern */\r\n\t\treturn (color instanceof CanvasPattern) ?\r\n\t\t\tcolor :\r\n\t\t\thelpers.color(color).saturate(0.5).darken(0.1).rgbString();\r\n\t};\r\n};\r\n\r\n},{\"2\":2}],27:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function() {\r\n\r\n\t//Occupy the global variable of Chart, and create a simple base class\r\n\tvar Chart = function(context, config) {\r\n\t\tvar me = this;\r\n\t\tvar helpers = Chart.helpers;\r\n\t\tme.config = config || { \r\n\t\t\tdata: {\r\n\t\t\t\tdatasets: []\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Support a jQuery'd canvas element\r\n\t\tif (context.length && context[0].getContext) {\r\n\t\t\tcontext = context[0];\r\n\t\t}\r\n\r\n\t\t// Support a canvas domnode\r\n\t\tif (context.getContext) {\r\n\t\t\tcontext = context.getContext(\"2d\");\r\n\t\t}\r\n\r\n\t\tme.ctx = context;\r\n\t\tme.canvas = context.canvas;\r\n\r\n\t\tcontext.canvas.style.display = context.canvas.style.display || 'block';\r\n\r\n\t\t// Figure out what the size of the chart will be.\r\n\t\t// If the canvas has a specified width and height, we use those else\r\n\t\t// we look to see if the canvas node has a CSS width and height.\r\n\t\t// If there is still no height, fill the parent container\r\n\t\tme.width = context.canvas.width || parseInt(helpers.getStyle(context.canvas, 'width'), 10) || helpers.getMaximumWidth(context.canvas);\r\n\t\tme.height = context.canvas.height || parseInt(helpers.getStyle(context.canvas, 'height'), 10) || helpers.getMaximumHeight(context.canvas);\r\n\r\n\t\tme.aspectRatio = me.width / me.height;\r\n\r\n\t\tif (isNaN(me.aspectRatio) || isFinite(me.aspectRatio) === false) {\r\n\t\t\t// If the canvas has no size, try and figure out what the aspect ratio will be.\r\n\t\t\t// Some charts prefer square canvases (pie, radar, etc). If that is specified, use that\r\n\t\t\t// else use the canvas default ratio of 2\r\n\t\t\tme.aspectRatio = config.aspectRatio !== undefined ? config.aspectRatio : 2;\r\n\t\t}\r\n\r\n\t\t// Store the original style of the element so we can set it back\r\n\t\tme.originalCanvasStyleWidth = context.canvas.style.width;\r\n\t\tme.originalCanvasStyleHeight = context.canvas.style.height;\r\n\r\n\t\t// High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.\r\n\t\thelpers.retinaScale(me);\r\n\t\tme.controller = new Chart.Controller(me);\r\n\r\n\t\t// Always bind this so that if the responsive state changes we still work\r\n\t\thelpers.addResizeListener(context.canvas.parentNode, function() {\r\n\t\t\tif (me.controller && me.controller.config.options.responsive) {\r\n\t\t\t\tme.controller.resize();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn me.controller ? me.controller : me;\r\n\r\n\t};\r\n\r\n\t//Globally expose the defaults to allow for user updating/changing\r\n\tChart.defaults = {\r\n\t\tglobal: {\r\n\t\t\tresponsive: true,\r\n\t\t\tresponsiveAnimationDuration: 0,\r\n\t\t\tmaintainAspectRatio: true,\r\n\t\t\tevents: [\"mousemove\", \"mouseout\", \"click\", \"touchstart\", \"touchmove\"],\r\n\t\t\thover: {\r\n\t\t\t\tonHover: null,\r\n\t\t\t\tmode: 'single',\r\n\t\t\t\tanimationDuration: 400\r\n\t\t\t},\r\n\t\t\tonClick: null,\r\n\t\t\tdefaultColor: 'rgba(0,0,0,0.1)',\r\n\t\t\tdefaultFontColor: '#666',\r\n\t\t\tdefaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\r\n\t\t\tdefaultFontSize: 12,\r\n\t\t\tdefaultFontStyle: 'normal',\r\n\t\t\tshowLines: true,\r\n\r\n\t\t\t// Element defaults defined in element extensions\r\n\t\t\telements: {},\r\n\r\n\t\t\t// Legend callback string\r\n\t\t\tlegendCallback: function(chart) {\r\n\t\t\t\tvar text = [];\r\n\t\t\t\ttext.push('<ul class=\"' + chart.id + '-legend\">');\r\n\t\t\t\tfor (var i = 0; i < chart.data.datasets.length; i++) {\r\n\t\t\t\t\ttext.push('<li><span style=\"background-color:' + chart.data.datasets[i].backgroundColor + '\"></span>');\r\n\t\t\t\t\tif (chart.data.datasets[i].label) {\r\n\t\t\t\t\t\ttext.push(chart.data.datasets[i].label);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttext.push('</li>');\r\n\t\t\t\t}\r\n\t\t\t\ttext.push('</ul>');\r\n\r\n\t\t\t\treturn text.join(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tChart.Chart = Chart;\r\n\r\n\treturn Chart;\r\n\r\n};\r\n\r\n},{}],28:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\t// The layout service is very self explanatory.  It's responsible for the layout within a chart.\r\n\t// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\r\n\t// It is this service's responsibility of carrying out that layout.\r\n\tChart.layoutService = {\r\n\t\tdefaults: {},\r\n\r\n\t\t// Register a box to a chartInstance. A box is simply a reference to an object that requires layout. eg. Scales, Legend, Plugins.\r\n\t\taddBox: function(chartInstance, box) {\r\n\t\t\tif (!chartInstance.boxes) {\r\n\t\t\t\tchartInstance.boxes = [];\r\n\t\t\t}\r\n\t\t\tchartInstance.boxes.push(box);\r\n\t\t},\r\n\r\n\t\tremoveBox: function(chartInstance, box) {\r\n\t\t\tif (!chartInstance.boxes) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tchartInstance.boxes.splice(chartInstance.boxes.indexOf(box), 1);\r\n\t\t},\r\n\r\n\t\t// The most important function\r\n\t\tupdate: function(chartInstance, width, height) {\r\n\r\n\t\t\tif (!chartInstance) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar xPadding = 0;\r\n\t\t\tvar yPadding = 0;\r\n\r\n\t\t\tvar leftBoxes = helpers.where(chartInstance.boxes, function(box) {\r\n\t\t\t\treturn box.options.position === \"left\";\r\n\t\t\t});\r\n\t\t\tvar rightBoxes = helpers.where(chartInstance.boxes, function(box) {\r\n\t\t\t\treturn box.options.position === \"right\";\r\n\t\t\t});\r\n\t\t\tvar topBoxes = helpers.where(chartInstance.boxes, function(box) {\r\n\t\t\t\treturn box.options.position === \"top\";\r\n\t\t\t});\r\n\t\t\tvar bottomBoxes = helpers.where(chartInstance.boxes, function(box) {\r\n\t\t\t\treturn box.options.position === \"bottom\";\r\n\t\t\t});\r\n\r\n\t\t\t// Boxes that overlay the chartarea such as the radialLinear scale\r\n\t\t\tvar chartAreaBoxes = helpers.where(chartInstance.boxes, function(box) {\r\n\t\t\t\treturn box.options.position === \"chartArea\";\r\n\t\t\t});\r\n\r\n\t\t\t// Ensure that full width boxes are at the very top / bottom\r\n\t\t\ttopBoxes.sort(function(a, b) {\r\n\t\t\t\treturn (b.options.fullWidth ? 1 : 0) - (a.options.fullWidth ? 1 : 0);\r\n\t\t\t});\r\n\t\t\tbottomBoxes.sort(function(a, b) {\r\n\t\t\t\treturn (a.options.fullWidth ? 1 : 0) - (b.options.fullWidth ? 1 : 0);\r\n\t\t\t});\r\n\r\n\t\t\t// Essentially we now have any number of boxes on each of the 4 sides.\r\n\t\t\t// Our canvas looks like the following.\r\n\t\t\t// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\r\n\t\t\t// B1 is the bottom axis\r\n\t\t\t// There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\r\n\t\t\t// These locations are single-box locations only, when trying to register a chartArea location that is already taken,\r\n\t\t\t// an error will be thrown.\r\n\t\t\t//\r\n\t\t\t// |----------------------------------------------------|\r\n\t\t\t// |                  T1 (Full Width)                   |\r\n\t\t\t// |----------------------------------------------------|\r\n\t\t\t// |    |    |                 T2                  |    |\r\n\t\t\t// |    |----|-------------------------------------|----|\r\n\t\t\t// |    |    | C1 |                           | C2 |    |\r\n\t\t\t// |    |    |----|                           |----|    |\r\n\t\t\t// |    |    |                                     |    |\r\n\t\t\t// | L1 | L2 |           ChartArea (C0)            | R1 |\r\n\t\t\t// |    |    |                                     |    |\r\n\t\t\t// |    |    |----|                           |----|    |\r\n\t\t\t// |    |    | C3 |                           | C4 |    |\r\n\t\t\t// |    |----|-------------------------------------|----|\r\n\t\t\t// |    |    |                 B1                  |    |\r\n\t\t\t// |----------------------------------------------------|\r\n\t\t\t// |                  B2 (Full Width)                   |\r\n\t\t\t// |----------------------------------------------------|\r\n\t\t\t//\r\n\t\t\t// What we do to find the best sizing, we do the following\r\n\t\t\t// 1. Determine the minimum size of the chart area.\r\n\t\t\t// 2. Split the remaining width equally between each vertical axis\r\n\t\t\t// 3. Split the remaining height equally between each horizontal axis\r\n\t\t\t// 4. Give each layout the maximum size it can be. The layout will return it's minimum size\r\n\t\t\t// 5. Adjust the sizes of each axis based on it's minimum reported size.\r\n\t\t\t// 6. Refit each axis\r\n\t\t\t// 7. Position each axis in the final location\r\n\t\t\t// 8. Tell the chart the final location of the chart area\r\n\t\t\t// 9. Tell any axes that overlay the chart area the positions of the chart area\r\n\r\n\t\t\t// Step 1\r\n\t\t\tvar chartWidth = width - (2 * xPadding);\r\n\t\t\tvar chartHeight = height - (2 * yPadding);\r\n\t\t\tvar chartAreaWidth = chartWidth / 2; // min 50%\r\n\t\t\tvar chartAreaHeight = chartHeight / 2; // min 50%\r\n\r\n\t\t\t// Step 2\r\n\t\t\tvar verticalBoxWidth = (width - chartAreaWidth) / (leftBoxes.length + rightBoxes.length);\r\n\r\n\t\t\t// Step 3\r\n\t\t\tvar horizontalBoxHeight = (height - chartAreaHeight) / (topBoxes.length + bottomBoxes.length);\r\n\r\n\t\t\t// Step 4\r\n\t\t\tvar maxChartAreaWidth = chartWidth;\r\n\t\t\tvar maxChartAreaHeight = chartHeight;\r\n\t\t\tvar minBoxSizes = [];\r\n\r\n\t\t\thelpers.each(leftBoxes.concat(rightBoxes, topBoxes, bottomBoxes), getMinimumBoxSize);\r\n\r\n\t\t\tfunction getMinimumBoxSize(box) {\r\n\t\t\t\tvar minSize;\r\n\t\t\t\tvar isHorizontal = box.isHorizontal();\r\n\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\tminSize = box.update(box.options.fullWidth ? chartWidth : maxChartAreaWidth, horizontalBoxHeight);\r\n\t\t\t\t\tmaxChartAreaHeight -= minSize.height;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tminSize = box.update(verticalBoxWidth, chartAreaHeight);\r\n\t\t\t\t\tmaxChartAreaWidth -= minSize.width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tminBoxSizes.push({\r\n\t\t\t\t\thorizontal: isHorizontal,\r\n\t\t\t\t\tminSize: minSize,\r\n\t\t\t\t\tbox: box\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// At this point, maxChartAreaHeight and maxChartAreaWidth are the size the chart area could\r\n\t\t\t// be if the axes are drawn at their minimum sizes.\r\n\r\n\t\t\t// Steps 5 & 6\r\n\t\t\tvar totalLeftBoxesWidth = xPadding;\r\n\t\t\tvar totalRightBoxesWidth = xPadding;\r\n\t\t\tvar totalTopBoxesHeight = yPadding;\r\n\t\t\tvar totalBottomBoxesHeight = yPadding;\r\n\r\n\t\t\t// Update, and calculate the left and right margins for the horizontal boxes\r\n\t\t\thelpers.each(leftBoxes.concat(rightBoxes), fitBox);\r\n\r\n\t\t\thelpers.each(leftBoxes, function(box) {\r\n\t\t\t\ttotalLeftBoxesWidth += box.width;\r\n\t\t\t});\r\n\r\n\t\t\thelpers.each(rightBoxes, function(box) {\r\n\t\t\t\ttotalRightBoxesWidth += box.width;\r\n\t\t\t});\r\n\r\n\t\t\t// Set the Left and Right margins for the horizontal boxes\r\n\t\t\thelpers.each(topBoxes.concat(bottomBoxes), fitBox);\r\n\r\n\t\t\t// Function to fit a box\r\n\t\t\tfunction fitBox(box) {\r\n\t\t\t\tvar minBoxSize = helpers.findNextWhere(minBoxSizes, function(minBoxSize) {\r\n\t\t\t\t\treturn minBoxSize.box === box;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (minBoxSize) {\r\n\t\t\t\t\tif (box.isHorizontal()) {\r\n\t\t\t\t\t\tvar scaleMargin = {\r\n\t\t\t\t\t\t\tleft: totalLeftBoxesWidth,\r\n\t\t\t\t\t\t\tright: totalRightBoxesWidth,\r\n\t\t\t\t\t\t\ttop: 0,\r\n\t\t\t\t\t\t\tbottom: 0\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t// Don't use min size here because of label rotation. When the labels are rotated, their rotation highly depends\r\n\t\t\t\t\t\t// on the margin. Sometimes they need to increase in size slightly\r\n\t\t\t\t\t\tbox.update(box.options.fullWidth ? chartWidth : maxChartAreaWidth, chartHeight / 2, scaleMargin);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbox.update(minBoxSize.minSize.width, maxChartAreaHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Figure out how much margin is on the top and bottom of the vertical boxes\r\n\t\t\thelpers.each(topBoxes, function(box) {\r\n\t\t\t\ttotalTopBoxesHeight += box.height;\r\n\t\t\t});\r\n\r\n\t\t\thelpers.each(bottomBoxes, function(box) {\r\n\t\t\t\ttotalBottomBoxesHeight += box.height;\r\n\t\t\t});\r\n\r\n\t\t\t// Let the left layout know the final margin\r\n\t\t\thelpers.each(leftBoxes.concat(rightBoxes), finalFitVerticalBox);\r\n\r\n\t\t\tfunction finalFitVerticalBox(box) {\r\n\t\t\t\tvar minBoxSize = helpers.findNextWhere(minBoxSizes, function(minBoxSize) {\r\n\t\t\t\t\treturn minBoxSize.box === box;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tvar scaleMargin = {\r\n\t\t\t\t\tleft: 0,\r\n\t\t\t\t\tright: 0,\r\n\t\t\t\t\ttop: totalTopBoxesHeight,\r\n\t\t\t\t\tbottom: totalBottomBoxesHeight\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif (minBoxSize) {\r\n\t\t\t\t\tbox.update(minBoxSize.minSize.width, maxChartAreaHeight, scaleMargin);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Recalculate because the size of each layout might have changed slightly due to the margins (label rotation for instance)\r\n\t\t\ttotalLeftBoxesWidth = xPadding;\r\n\t\t\ttotalRightBoxesWidth = xPadding;\r\n\t\t\ttotalTopBoxesHeight = yPadding;\r\n\t\t\ttotalBottomBoxesHeight = yPadding;\r\n\r\n\t\t\thelpers.each(leftBoxes, function(box) {\r\n\t\t\t\ttotalLeftBoxesWidth += box.width;\r\n\t\t\t});\r\n\r\n\t\t\thelpers.each(rightBoxes, function(box) {\r\n\t\t\t\ttotalRightBoxesWidth += box.width;\r\n\t\t\t});\r\n\r\n\t\t\thelpers.each(topBoxes, function(box) {\r\n\t\t\t\ttotalTopBoxesHeight += box.height;\r\n\t\t\t});\r\n\t\t\thelpers.each(bottomBoxes, function(box) {\r\n\t\t\t\ttotalBottomBoxesHeight += box.height;\r\n\t\t\t});\r\n\r\n\t\t\t// Figure out if our chart area changed. This would occur if the dataset layout label rotation\r\n\t\t\t// changed due to the application of the margins in step 6. Since we can only get bigger, this is safe to do\r\n\t\t\t// without calling `fit` again\r\n\t\t\tvar newMaxChartAreaHeight = height - totalTopBoxesHeight - totalBottomBoxesHeight;\r\n\t\t\tvar newMaxChartAreaWidth = width - totalLeftBoxesWidth - totalRightBoxesWidth;\r\n\r\n\t\t\tif (newMaxChartAreaWidth !== maxChartAreaWidth || newMaxChartAreaHeight !== maxChartAreaHeight) {\r\n\t\t\t\thelpers.each(leftBoxes, function(box) {\r\n\t\t\t\t\tbox.height = newMaxChartAreaHeight;\r\n\t\t\t\t});\r\n\r\n\t\t\t\thelpers.each(rightBoxes, function(box) {\r\n\t\t\t\t\tbox.height = newMaxChartAreaHeight;\r\n\t\t\t\t});\r\n\r\n\t\t\t\thelpers.each(topBoxes, function(box) {\r\n\t\t\t\t\tif (!box.options.fullWidth) {\r\n\t\t\t\t\t\tbox.width = newMaxChartAreaWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\thelpers.each(bottomBoxes, function(box) {\r\n\t\t\t\t\tif (!box.options.fullWidth) {\r\n\t\t\t\t\t\tbox.width = newMaxChartAreaWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tmaxChartAreaHeight = newMaxChartAreaHeight;\r\n\t\t\t\tmaxChartAreaWidth = newMaxChartAreaWidth;\r\n\t\t\t}\r\n\r\n\t\t\t// Step 7 - Position the boxes\r\n\t\t\tvar left = xPadding;\r\n\t\t\tvar top = yPadding;\r\n\r\n\t\t\thelpers.each(leftBoxes.concat(topBoxes), placeBox);\r\n\r\n\t\t\t// Account for chart width and height\r\n\t\t\tleft += maxChartAreaWidth;\r\n\t\t\ttop += maxChartAreaHeight;\r\n\r\n\t\t\thelpers.each(rightBoxes, placeBox);\r\n\t\t\thelpers.each(bottomBoxes, placeBox);\r\n\r\n\t\t\tfunction placeBox(box) {\r\n\t\t\t\tif (box.isHorizontal()) {\r\n\t\t\t\t\tbox.left = box.options.fullWidth ? xPadding : totalLeftBoxesWidth;\r\n\t\t\t\t\tbox.right = box.options.fullWidth ? width - xPadding : totalLeftBoxesWidth + maxChartAreaWidth;\r\n\t\t\t\t\tbox.top = top;\r\n\t\t\t\t\tbox.bottom = top + box.height;\r\n\r\n\t\t\t\t\t// Move to next point\r\n\t\t\t\t\ttop = box.bottom;\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tbox.left = left;\r\n\t\t\t\t\tbox.right = left + box.width;\r\n\t\t\t\t\tbox.top = totalTopBoxesHeight;\r\n\t\t\t\t\tbox.bottom = totalTopBoxesHeight + maxChartAreaHeight;\r\n\r\n\t\t\t\t\t// Move to next point\r\n\t\t\t\t\tleft = box.right;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Step 8\r\n\t\t\tchartInstance.chartArea = {\r\n\t\t\t\tleft: totalLeftBoxesWidth,\r\n\t\t\t\ttop: totalTopBoxesHeight,\r\n\t\t\t\tright: totalLeftBoxesWidth + maxChartAreaWidth,\r\n\t\t\t\tbottom: totalTopBoxesHeight + maxChartAreaHeight\r\n\t\t\t};\r\n\r\n\t\t\t// Step 9\r\n\t\t\thelpers.each(chartAreaBoxes, function(box) {\r\n\t\t\t\tbox.left = chartInstance.chartArea.left;\r\n\t\t\t\tbox.top = chartInstance.chartArea.top;\r\n\t\t\t\tbox.right = chartInstance.chartArea.right;\r\n\t\t\t\tbox.bottom = chartInstance.chartArea.bottom;\r\n\r\n\t\t\t\tbox.update(maxChartAreaWidth, maxChartAreaHeight);\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n};\r\n\r\n},{}],29:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\tvar noop = helpers.noop;\r\n\r\n\tChart.defaults.global.legend = {\r\n\r\n\t\tdisplay: true,\r\n\t\tposition: 'top',\r\n\t\tfullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes)\r\n\t\treverse: false,\r\n\r\n\t\t// a callback that will handle\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.datasetIndex;\r\n\t\t\tvar ci = this.chart;\r\n\t\t\tvar meta = ci.getDatasetMeta(index);\r\n\r\n\t\t\t// See controller.isDatasetVisible comment\r\n\t\t\tmeta.hidden = meta.hidden === null? !ci.data.datasets[index].hidden : null;\r\n\r\n\t\t\t// We hid a dataset ... rerender the chart\r\n\t\t\tci.update();\r\n\t\t},\r\n\r\n\t\tlabels: {\r\n\t\t\tboxWidth: 40,\r\n\t\t\tpadding: 10,\r\n\t\t\t// Generates labels shown in the legend\r\n\t\t\t// Valid properties to return:\r\n\t\t\t// text : text to display\r\n\t\t\t// fillStyle : fill of coloured box\r\n\t\t\t// strokeStyle: stroke of coloured box\r\n\t\t\t// hidden : if this legend item refers to a hidden item\r\n\t\t\t// lineCap : cap style for line\r\n\t\t\t// lineDash\r\n\t\t\t// lineDashOffset :\r\n\t\t\t// lineJoin :\r\n\t\t\t// lineWidth :\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\treturn helpers.isArray(data.datasets) ? data.datasets.map(function(dataset, i) {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttext: dataset.label,\r\n\t\t\t\t\t\tfillStyle: (!helpers.isArray(dataset.backgroundColor) ? dataset.backgroundColor : dataset.backgroundColor[0]),\r\n\t\t\t\t\t\thidden: !chart.isDatasetVisible(i),\r\n\t\t\t\t\t\tlineCap: dataset.borderCapStyle,\r\n\t\t\t\t\t\tlineDash: dataset.borderDash,\r\n\t\t\t\t\t\tlineDashOffset: dataset.borderDashOffset,\r\n\t\t\t\t\t\tlineJoin: dataset.borderJoinStyle,\r\n\t\t\t\t\t\tlineWidth: dataset.borderWidth,\r\n\t\t\t\t\t\tstrokeStyle: dataset.borderColor,\r\n\t\t\t\t\t\tpointStyle: dataset.pointStyle,\r\n\r\n\t\t\t\t\t\t// Below is extra data used for toggling the datasets\r\n\t\t\t\t\t\tdatasetIndex: i\r\n\t\t\t\t\t};\r\n\t\t\t\t}, this) : [];\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tChart.Legend = Chart.Element.extend({\r\n\r\n\t\tinitialize: function(config) {\r\n\t\t\thelpers.extend(this, config);\r\n\r\n\t\t\t// Contains hit boxes for each dataset (in dataset order)\r\n\t\t\tthis.legendHitBoxes = [];\r\n\r\n\t\t\t// Are we in doughnut mode which has a different data type\r\n\t\t\tthis.doughnutMode = false;\r\n\t\t},\r\n\r\n\t\t// These methods are ordered by lifecyle. Utilities then follow.\r\n\t\t// Any function defined here is inherited by all legend types.\r\n\t\t// Any function can be extended by the legend type\r\n\r\n\t\tbeforeUpdate: noop,\r\n\t\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\t\tme.beforeUpdate();\r\n\r\n\t\t\t// Absorb the master measurements\r\n\t\t\tme.maxWidth = maxWidth;\r\n\t\t\tme.maxHeight = maxHeight;\r\n\t\t\tme.margins = margins;\r\n\r\n\t\t\t// Dimensions\r\n\t\t\tme.beforeSetDimensions();\r\n\t\t\tme.setDimensions();\r\n\t\t\tme.afterSetDimensions();\r\n\t\t\t// Labels\r\n\t\t\tme.beforeBuildLabels();\r\n\t\t\tme.buildLabels();\r\n\t\t\tme.afterBuildLabels();\r\n\r\n\t\t\t// Fit\r\n\t\t\tme.beforeFit();\r\n\t\t\tme.fit();\r\n\t\t\tme.afterFit();\r\n\t\t\t//\r\n\t\t\tme.afterUpdate();\r\n\r\n\t\t\treturn me.minSize;\r\n\t\t},\r\n\t\tafterUpdate: noop,\r\n\r\n\t\t//\r\n\r\n\t\tbeforeSetDimensions: noop,\r\n\t\tsetDimensions: function() {\r\n\t\t\tvar me = this;\r\n\t\t\t// Set the unconstrained dimension before label rotation\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\t// Reset position before calculating rotation\r\n\t\t\t\tme.width = me.maxWidth;\r\n\t\t\t\tme.left = 0;\r\n\t\t\t\tme.right = me.width;\r\n\t\t\t} else {\r\n\t\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t\t// Reset position before calculating rotation\r\n\t\t\t\tme.top = 0;\r\n\t\t\t\tme.bottom = me.height;\r\n\t\t\t}\r\n\r\n\t\t\t// Reset padding\r\n\t\t\tme.paddingLeft = 0;\r\n\t\t\tme.paddingTop = 0;\r\n\t\t\tme.paddingRight = 0;\r\n\t\t\tme.paddingBottom = 0;\r\n\r\n\t\t\t// Reset minSize\r\n\t\t\tme.minSize = {\r\n\t\t\t\twidth: 0,\r\n\t\t\t\theight: 0\r\n\t\t\t};\r\n\t\t},\r\n\t\tafterSetDimensions: noop,\r\n\r\n\t\t//\r\n\r\n\t\tbeforeBuildLabels: noop,\r\n\t\tbuildLabels: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tme.legendItems = me.options.labels.generateLabels.call(me, me.chart);\r\n\t\t\tif(me.options.reverse){\r\n\t\t\t\tme.legendItems.reverse();\r\n\t\t\t}\r\n\t\t},\r\n\t\tafterBuildLabels: noop,\r\n\r\n\t\t//\r\n\r\n\t\tbeforeFit: noop,\r\n\t\tfit: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar labelOpts = opts.labels;\r\n\t\t\tvar display = opts.display;\r\n\r\n\t\t\tvar ctx = me.ctx;\r\n\r\n\t\t\tvar globalDefault = Chart.defaults.global,\r\n\t\t\t\titemOrDefault = helpers.getValueOrDefault,\r\n\t\t\t\tfontSize = itemOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize),\r\n\t\t\t\tfontStyle = itemOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle),\r\n\t\t\t\tfontFamily = itemOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily),\r\n\t\t\t\tlabelFont = helpers.fontString(fontSize, fontStyle, fontFamily);\r\n\r\n\t\t\t// Reset hit boxes\r\n\t\t\tvar hitboxes = me.legendHitBoxes = [];\r\n\r\n\t\t\tvar minSize = me.minSize;\r\n\t\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tminSize.width = me.maxWidth; // fill all the width\r\n\t\t\t\tminSize.height = display ? 10 : 0;\r\n\t\t\t} else {\r\n\t\t\t\tminSize.width = display ? 10 : 0;\r\n\t\t\t\tminSize.height = me.maxHeight; // fill all the height\r\n\t\t\t}\r\n\r\n\t\t\t// Increase sizes here\r\n\t\t\tif (display) {\r\n\t\t\t\tctx.font = labelFont;\r\n\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\t// Labels\r\n\r\n\t\t\t\t\t// Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one\r\n\t\t\t\t\tvar lineWidths = me.lineWidths = [0];\r\n\t\t\t\t\tvar totalHeight = me.legendItems.length ? fontSize + (labelOpts.padding) : 0;\r\n\r\n\t\t\t\t\tctx.textAlign = \"left\";\r\n\t\t\t\t\tctx.textBaseline = 'top';\r\n\r\n\t\t\t\t\thelpers.each(me.legendItems, function(legendItem, i) {\r\n\t\t\t\t\t\tvar boxWidth = labelOpts.usePointStyle ?\r\n\t\t\t\t\t\t\tfontSize * Math.sqrt(2) :\r\n\t\t\t\t\t\t\tlabelOpts.boxWidth;\r\n\r\n\t\t\t\t\t\tvar width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\r\n\t\t\t\t\t\tif (lineWidths[lineWidths.length - 1] + width + labelOpts.padding >= me.width) {\r\n\t\t\t\t\t\t\ttotalHeight += fontSize + (labelOpts.padding);\r\n\t\t\t\t\t\t\tlineWidths[lineWidths.length] = me.left;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\r\n\t\t\t\t\t\thitboxes[i] = {\r\n\t\t\t\t\t\t\tleft: 0,\r\n\t\t\t\t\t\t\ttop: 0,\r\n\t\t\t\t\t\t\twidth: width,\r\n\t\t\t\t\t\t\theight: fontSize\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tlineWidths[lineWidths.length - 1] += width + labelOpts.padding;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tminSize.height += totalHeight;\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar vPadding = labelOpts.padding;\r\n\t\t\t\t\tvar columnWidths = me.columnWidths = [];\r\n\t\t\t\t\tvar totalWidth = labelOpts.padding;\r\n\t\t\t\t\tvar currentColWidth = 0;\r\n\t\t\t\t\tvar currentColHeight = 0;\r\n\t\t\t\t\tvar itemHeight = fontSize + vPadding;\r\n\r\n\t\t\t\t\thelpers.each(me.legendItems, function(legendItem, i) {\r\n\t\t\t\t\t\t// If usePointStyle is set, multiple boxWidth by 2 since it represents\r\n\t\t\t\t\t\t// the radius and not truly the width\r\n\t\t\t\t\t\tvar boxWidth = labelOpts.usePointStyle ? 2 * labelOpts.boxWidth : labelOpts.boxWidth;\r\n\r\n\t\t\t\t\t\tvar itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\r\n\r\n\t\t\t\t\t\t// If too tall, go to new column\r\n\t\t\t\t\t\tif (currentColHeight + itemHeight > minSize.height) {\r\n\t\t\t\t\t\t\ttotalWidth += currentColWidth + labelOpts.padding;\r\n\t\t\t\t\t\t\tcolumnWidths.push(currentColWidth); // previous column width\r\n\r\n\t\t\t\t\t\t\tcurrentColWidth = 0;\r\n\t\t\t\t\t\t\tcurrentColHeight = 0;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Get max width\r\n\t\t\t\t\t\tcurrentColWidth = Math.max(currentColWidth, itemWidth);\r\n\t\t\t\t\t\tcurrentColHeight += itemHeight;\r\n\r\n\t\t\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\r\n\t\t\t\t\t\thitboxes[i] = {\r\n\t\t\t\t\t\t\tleft: 0,\r\n\t\t\t\t\t\t\ttop: 0,\r\n\t\t\t\t\t\t\twidth: itemWidth,\r\n\t\t\t\t\t\t\theight: fontSize\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\ttotalWidth += currentColWidth;\r\n\t\t\t\t\tcolumnWidths.push(currentColWidth);\r\n\t\t\t\t\tminSize.width += totalWidth;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tme.width = minSize.width;\r\n\t\t\tme.height = minSize.height;\r\n\t\t},\r\n\t\tafterFit: noop,\r\n\r\n\t\t// Shared Methods\r\n\t\tisHorizontal: function() {\r\n\t\t\treturn this.options.position === \"top\" || this.options.position === \"bottom\";\r\n\t\t},\r\n\r\n\t\t// Actualy draw the legend on the canvas\r\n\t\tdraw: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar labelOpts = opts.labels;\r\n\t\t\tvar globalDefault = Chart.defaults.global,\r\n\t\t\t\tlineDefault = globalDefault.elements.line,\r\n\t\t\t\tlegendWidth = me.width,\r\n\t\t\t\tlineWidths = me.lineWidths;\r\n\r\n\t\t\tif (opts.display) {\r\n\t\t\t\tvar ctx = me.ctx,\r\n\t\t\t\t\tcursor,\r\n\t\t\t\t\titemOrDefault = helpers.getValueOrDefault,\r\n\t\t\t\t\tfontColor = itemOrDefault(labelOpts.fontColor, globalDefault.defaultFontColor),\r\n\t\t\t\t\tfontSize = itemOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize),\r\n\t\t\t\t\tfontStyle = itemOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle),\r\n\t\t\t\t\tfontFamily = itemOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily),\r\n\t\t\t\t\tlabelFont = helpers.fontString(fontSize, fontStyle, fontFamily);\r\n\r\n\t\t\t\t// Canvas setup\r\n\t\t\t\tctx.textAlign = \"left\";\r\n\t\t\t\tctx.textBaseline = 'top';\r\n\t\t\t\tctx.lineWidth = 0.5;\r\n\t\t\t\tctx.strokeStyle = fontColor; // for strikethrough effect\r\n\t\t\t\tctx.fillStyle = fontColor; // render in correct colour\r\n\t\t\t\tctx.font = labelFont;\r\n\r\n\t\t\t\tvar boxWidth = labelOpts.boxWidth,\r\n\t\t\t\t\thitboxes = me.legendHitBoxes;\r\n\r\n\t\t\t\t// current position\r\n\t\t\t\tvar drawLegendBox = function(x, y, legendItem) {\r\n\t\t\t\t\tif (isNaN(boxWidth) || boxWidth <= 0) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Set the ctx for the box\r\n\t\t\t\t\tctx.save();\r\n\r\n\t\t\t\t\tctx.fillStyle = itemOrDefault(legendItem.fillStyle, globalDefault.defaultColor);\r\n\t\t\t\t\tctx.lineCap = itemOrDefault(legendItem.lineCap, lineDefault.borderCapStyle);\r\n\t\t\t\t\tctx.lineDashOffset = itemOrDefault(legendItem.lineDashOffset, lineDefault.borderDashOffset);\r\n\t\t\t\t\tctx.lineJoin = itemOrDefault(legendItem.lineJoin, lineDefault.borderJoinStyle);\r\n\t\t\t\t\tctx.lineWidth = itemOrDefault(legendItem.lineWidth, lineDefault.borderWidth);\r\n\t\t\t\t\tctx.strokeStyle = itemOrDefault(legendItem.strokeStyle, globalDefault.defaultColor);\r\n\r\n\t\t\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\t\t\t// IE 9 and 10 do not support line dash\r\n\t\t\t\t\t\tctx.setLineDash(itemOrDefault(legendItem.lineDash, lineDefault.borderDash));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opts.labels && opts.labels.usePointStyle) {\r\n\t\t\t\t\t\t// Recalulate x and y for drawPoint() because its expecting\r\n\t\t\t\t\t\t// x and y to be center of figure (instead of top left)\r\n\t\t\t\t\t\tvar radius = fontSize * Math.SQRT2 / 2;\r\n\t\t\t\t\t\tvar offSet = radius / Math.SQRT2;\r\n\t\t\t\t\t\tvar centerX = x + offSet;\r\n\t\t\t\t\t\tvar centerY = y + offSet;\r\n\r\n\t\t\t\t\t\t// Draw pointStyle as legend symbol\r\n\t\t\t\t\t\tChart.canvasHelpers.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// Draw box as legend symbol\r\n\t\t\t\t\t\tctx.strokeRect(x, y, boxWidth, fontSize);\r\n\t\t\t\t\t\tctx.fillRect(x, y, boxWidth, fontSize);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tctx.restore();\r\n\t\t\t\t};\r\n\t\t\t\tvar fillText = function(x, y, legendItem, textWidth) {\r\n\t\t\t\t\tctx.fillText(legendItem.text, boxWidth + (fontSize / 2) + x, y);\r\n\r\n\t\t\t\t\tif (legendItem.hidden) {\r\n\t\t\t\t\t\t// Strikethrough the text if hidden\r\n\t\t\t\t\t\tctx.beginPath();\r\n\t\t\t\t\t\tctx.lineWidth = 2;\r\n\t\t\t\t\t\tctx.moveTo(boxWidth + (fontSize / 2) + x, y + (fontSize / 2));\r\n\t\t\t\t\t\tctx.lineTo(boxWidth + (fontSize / 2) + x + textWidth, y + (fontSize / 2));\r\n\t\t\t\t\t\tctx.stroke();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Horizontal\r\n\t\t\t\tvar isHorizontal = me.isHorizontal();\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\tcursor = {\r\n\t\t\t\t\t\tx: me.left + ((legendWidth - lineWidths[0]) / 2),\r\n\t\t\t\t\t\ty: me.top + labelOpts.padding,\r\n\t\t\t\t\t\tline: 0\r\n\t\t\t\t\t};\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcursor = {\r\n\t\t\t\t\t\tx: me.left + labelOpts.padding,\r\n\t\t\t\t\t\ty: me.top + labelOpts.padding,\r\n\t\t\t\t\t\tline: 0\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar itemHeight = fontSize + labelOpts.padding;\r\n\t\t\t\thelpers.each(me.legendItems, function(legendItem, i) {\r\n\t\t\t\t\tvar textWidth = ctx.measureText(legendItem.text).width,\r\n\t\t\t\t\t\twidth = labelOpts.usePointStyle ?\r\n\t\t\t\t\t\t\tfontSize + (fontSize / 2) + textWidth :\r\n\t\t\t\t\t\t\tboxWidth + (fontSize / 2) + textWidth,\r\n\t\t\t\t\t\tx = cursor.x,\r\n\t\t\t\t\t\ty = cursor.y;\r\n\r\n\t\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\t\tif (x + width >= legendWidth) {\r\n\t\t\t\t\t\t\ty = cursor.y += itemHeight;\r\n\t\t\t\t\t\t\tcursor.line++;\r\n\t\t\t\t\t\t\tx = cursor.x = me.left + ((legendWidth - lineWidths[cursor.line]) / 2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (y + itemHeight > me.bottom) {\r\n\t\t\t\t\t\t\tx = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding;\r\n\t\t\t\t\t\t\ty = cursor.y = me.top;\r\n\t\t\t\t\t\t\tcursor.line++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdrawLegendBox(x, y, legendItem);\r\n\r\n\t\t\t\t\thitboxes[i].left = x;\r\n\t\t\t\t\thitboxes[i].top = y;\r\n\r\n\t\t\t\t\t// Fill the actual label\r\n\t\t\t\t\tfillText(x, y, legendItem, textWidth);\r\n\r\n\t\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\t\tcursor.x += width + (labelOpts.padding);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcursor.y += itemHeight;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// Handle an event\r\n\t\thandleEvent: function(e) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar position = helpers.getRelativePosition(e, me.chart.chart),\r\n\t\t\t\tx = position.x,\r\n\t\t\t\ty = position.y,\r\n\t\t\t\topts = me.options;\r\n\r\n\t\t\tif (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {\r\n\t\t\t\t// See if we are touching one of the dataset boxes\r\n\t\t\t\tvar lh = me.legendHitBoxes;\r\n\t\t\t\tfor (var i = 0; i < lh.length; ++i) {\r\n\t\t\t\t\tvar hitBox = lh[i];\r\n\r\n\t\t\t\t\tif (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {\r\n\t\t\t\t\t\t// Touching an element\r\n\t\t\t\t\t\tif (opts.onClick) {\r\n\t\t\t\t\t\t\topts.onClick.call(me, e, me.legendItems[i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t// Register the legend plugin\r\n\tChart.plugins.register({\r\n\t\tbeforeInit: function(chartInstance) {\r\n\t\t\tvar opts = chartInstance.options;\r\n\t\t\tvar legendOpts = opts.legend;\r\n\r\n\t\t\tif (legendOpts) {\r\n\t\t\t\tchartInstance.legend = new Chart.Legend({\r\n\t\t\t\t\tctx: chartInstance.chart.ctx,\r\n\t\t\t\t\toptions: legendOpts,\r\n\t\t\t\t\tchart: chartInstance\r\n\t\t\t\t});\r\n\r\n\t\t\t\tChart.layoutService.addBox(chartInstance, chartInstance.legend);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],30:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar noop = Chart.helpers.noop;\r\n\r\n\t/**\r\n\t * The plugin service singleton\r\n\t * @namespace Chart.plugins\r\n\t * @since 2.1.0\r\n\t */\r\n\tChart.plugins = {\r\n\t\t_plugins: [],\r\n\r\n\t\t/**\r\n\t\t * Registers the given plugin(s) if not already registered.\r\n\t\t * @param {Array|Object} plugins plugin instance(s).\r\n\t\t */\r\n\t\tregister: function(plugins) {\r\n\t\t\tvar p = this._plugins;\r\n\t\t\t([]).concat(plugins).forEach(function(plugin) {\r\n\t\t\t\tif (p.indexOf(plugin) === -1) {\r\n\t\t\t\t\tp.push(plugin);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Unregisters the given plugin(s) only if registered.\r\n\t\t * @param {Array|Object} plugins plugin instance(s).\r\n\t\t */\r\n\t\tunregister: function(plugins) {\r\n\t\t\tvar p = this._plugins;\r\n\t\t\t([]).concat(plugins).forEach(function(plugin) {\r\n\t\t\t\tvar idx = p.indexOf(plugin);\r\n\t\t\t\tif (idx !== -1) {\r\n\t\t\t\t\tp.splice(idx, 1);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Remove all registered p^lugins.\r\n\t\t * @since 2.1.5\r\n\t\t */\r\n\t\tclear: function() {\r\n\t\t\tthis._plugins = [];\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Returns the number of registered plugins?\r\n\t\t * @returns {Number}\r\n\t\t * @since 2.1.5\r\n\t\t */\r\n\t\tcount: function() {\r\n\t\t\treturn this._plugins.length;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Returns all registered plugin intances.\r\n\t\t * @returns {Array} array of plugin objects.\r\n\t\t * @since 2.1.5\r\n\t\t */\r\n\t\tgetAll: function() {\r\n\t\t\treturn this._plugins;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Calls registered plugins on the specified extension, with the given args. This\r\n\t\t * method immediately returns as soon as a plugin explicitly returns false. The\r\n\t\t * returned value can be used, for instance, to interrupt the current action.\r\n\t\t * @param {String} extension the name of the plugin method to call (e.g. 'beforeUpdate').\r\n\t\t * @param {Array} [args] extra arguments to apply to the extension call.\r\n\t\t * @returns {Boolean} false if any of the plugins return false, else returns true.\r\n\t\t */\r\n\t\tnotify: function(extension, args) {\r\n\t\t\tvar plugins = this._plugins;\r\n\t\t\tvar ilen = plugins.length;\r\n\t\t\tvar i, plugin;\r\n\r\n\t\t\tfor (i=0; i<ilen; ++i) {\r\n\t\t\t\tplugin = plugins[i];\r\n\t\t\t\tif (typeof plugin[extension] === 'function') {\r\n\t\t\t\t\tif (plugin[extension].apply(plugin, args || []) === false) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Plugin extension methods.\r\n\t * @interface Chart.PluginBase\r\n\t * @since 2.1.0\r\n\t */\r\n\tChart.PluginBase = Chart.Element.extend({\r\n\t\t// Called at start of chart init\r\n\t\tbeforeInit: noop,\r\n\r\n\t\t// Called at end of chart init\r\n\t\tafterInit: noop,\r\n\r\n\t\t// Called at start of update\r\n\t\tbeforeUpdate: noop,\r\n\r\n\t\t// Called at end of update\r\n\t\tafterUpdate: noop,\r\n\r\n\t\t// Called at start of draw\r\n\t\tbeforeDraw: noop,\r\n\r\n\t\t// Called at end of draw\r\n\t\tafterDraw: noop,\r\n\r\n\t\t// Called during destroy\r\n\t\tdestroy: noop\r\n\t});\r\n\r\n\t/**\r\n\t * Provided for backward compatibility, use Chart.plugins instead\r\n\t * @namespace Chart.pluginService\r\n\t * @deprecated since version 2.1.5\r\n\t * @todo remove me at version 3\r\n\t */\r\n\tChart.pluginService = Chart.plugins;\r\n};\r\n\r\n},{}],31:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.scale = {\r\n\t\tdisplay: true,\r\n\t\tposition: \"left\",\r\n\r\n\t\t// grid line settings\r\n\t\tgridLines: {\r\n\t\t\tdisplay: true,\r\n\t\t\tcolor: \"rgba(0, 0, 0, 0.1)\",\r\n\t\t\tlineWidth: 1,\r\n\t\t\tdrawBorder: true,\r\n\t\t\tdrawOnChartArea: true,\r\n\t\t\tdrawTicks: true,\r\n\t\t\ttickMarkLength: 10,\r\n\t\t\tzeroLineWidth: 1,\r\n\t\t\tzeroLineColor: \"rgba(0,0,0,0.25)\",\r\n\t\t\toffsetGridLines: false,\r\n\t\t\tborderDash: [],\r\n\t\t\tborderDashOffset: 0.0\r\n\t\t},\r\n\r\n\t\t// scale label\r\n\t\tscaleLabel: {\r\n\t\t\t// actual label\r\n\t\t\tlabelString: '',\r\n\r\n\t\t\t// display property\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\r\n\t\t// label settings\r\n\t\tticks: {\r\n\t\t\tbeginAtZero: false,\r\n\t\t\tminRotation: 0,\r\n\t\t\tmaxRotation: 50,\r\n\t\t\tmirror: false,\r\n\t\t\tpadding: 10,\r\n\t\t\treverse: false,\r\n\t\t\tdisplay: true,\r\n\t\t\tautoSkip: true,\r\n\t\t\tautoSkipPadding: 0,\r\n\t\t\tlabelOffset: 0,\r\n\t\t\t// We pass through arrays to be rendered as multiline labels, we convert Others to strings here.\r\n\t\t\tcallback: function(value) {\r\n\t\t\t\treturn helpers.isArray(value) ? value : '' + value;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tChart.Scale = Chart.Element.extend({\r\n\r\n\t\t// These methods are ordered by lifecyle. Utilities then follow.\r\n\t\t// Any function defined here is inherited by all scale types.\r\n\t\t// Any function can be extended by the scale type\r\n\r\n\t\tbeforeUpdate: function() {\r\n\t\t\thelpers.callCallback(this.options.beforeUpdate, [this]);\r\n\t\t},\r\n\t\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\t\tme.beforeUpdate();\r\n\r\n\t\t\t// Absorb the master measurements\r\n\t\t\tme.maxWidth = maxWidth;\r\n\t\t\tme.maxHeight = maxHeight;\r\n\t\t\tme.margins = helpers.extend({\r\n\t\t\t\tleft: 0,\r\n\t\t\t\tright: 0,\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tbottom: 0\r\n\t\t\t}, margins);\r\n\r\n\t\t\t// Dimensions\r\n\t\t\tme.beforeSetDimensions();\r\n\t\t\tme.setDimensions();\r\n\t\t\tme.afterSetDimensions();\r\n\r\n\t\t\t// Data min/max\r\n\t\t\tme.beforeDataLimits();\r\n\t\t\tme.determineDataLimits();\r\n\t\t\tme.afterDataLimits();\r\n\r\n\t\t\t// Ticks\r\n\t\t\tme.beforeBuildTicks();\r\n\t\t\tme.buildTicks();\r\n\t\t\tme.afterBuildTicks();\r\n\r\n\t\t\tme.beforeTickToLabelConversion();\r\n\t\t\tme.convertTicksToLabels();\r\n\t\t\tme.afterTickToLabelConversion();\r\n\r\n\t\t\t// Tick Rotation\r\n\t\t\tme.beforeCalculateTickRotation();\r\n\t\t\tme.calculateTickRotation();\r\n\t\t\tme.afterCalculateTickRotation();\r\n\t\t\t// Fit\r\n\t\t\tme.beforeFit();\r\n\t\t\tme.fit();\r\n\t\t\tme.afterFit();\r\n\t\t\t//\r\n\t\t\tme.afterUpdate();\r\n\r\n\t\t\treturn me.minSize;\r\n\r\n\t\t},\r\n\t\tafterUpdate: function() {\r\n\t\t\thelpers.callCallback(this.options.afterUpdate, [this]);\r\n\t\t},\r\n\r\n\t\t//\r\n\r\n\t\tbeforeSetDimensions: function() {\r\n\t\t\thelpers.callCallback(this.options.beforeSetDimensions, [this]);\r\n\t\t},\r\n\t\tsetDimensions: function() {\r\n\t\t\tvar me = this;\r\n\t\t\t// Set the unconstrained dimension before label rotation\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\t// Reset position before calculating rotation\r\n\t\t\t\tme.width = me.maxWidth;\r\n\t\t\t\tme.left = 0;\r\n\t\t\t\tme.right = me.width;\r\n\t\t\t} else {\r\n\t\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t\t// Reset position before calculating rotation\r\n\t\t\t\tme.top = 0;\r\n\t\t\t\tme.bottom = me.height;\r\n\t\t\t}\r\n\r\n\t\t\t// Reset padding\r\n\t\t\tme.paddingLeft = 0;\r\n\t\t\tme.paddingTop = 0;\r\n\t\t\tme.paddingRight = 0;\r\n\t\t\tme.paddingBottom = 0;\r\n\t\t},\r\n\t\tafterSetDimensions: function() {\r\n\t\t\thelpers.callCallback(this.options.afterSetDimensions, [this]);\r\n\t\t},\r\n\r\n\t\t// Data limits\r\n\t\tbeforeDataLimits: function() {\r\n\t\t\thelpers.callCallback(this.options.beforeDataLimits, [this]);\r\n\t\t},\r\n\t\tdetermineDataLimits: helpers.noop,\r\n\t\tafterDataLimits: function() {\r\n\t\t\thelpers.callCallback(this.options.afterDataLimits, [this]);\r\n\t\t},\r\n\r\n\t\t//\r\n\t\tbeforeBuildTicks: function() {\r\n\t\t\thelpers.callCallback(this.options.beforeBuildTicks, [this]);\r\n\t\t},\r\n\t\tbuildTicks: helpers.noop,\r\n\t\tafterBuildTicks: function() {\r\n\t\t\thelpers.callCallback(this.options.afterBuildTicks, [this]);\r\n\t\t},\r\n\r\n\t\tbeforeTickToLabelConversion: function() {\r\n\t\t\thelpers.callCallback(this.options.beforeTickToLabelConversion, [this]);\r\n\t\t},\r\n\t\tconvertTicksToLabels: function() {\r\n\t\t\tvar me = this;\r\n\t\t\t// Convert ticks to strings\r\n\t\t\tme.ticks = me.ticks.map(function(numericalTick, index, ticks) {\r\n\t\t\t\t\tif (me.options.ticks.userCallback) {\r\n\t\t\t\t\t\treturn me.options.ticks.userCallback(numericalTick, index, ticks);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn me.options.ticks.callback(numericalTick, index, ticks);\r\n\t\t\t\t},\r\n\t\t\t\tme);\r\n\t\t},\r\n\t\tafterTickToLabelConversion: function() {\r\n\t\t\thelpers.callCallback(this.options.afterTickToLabelConversion, [this]);\r\n\t\t},\r\n\r\n\t\t//\r\n\r\n\t\tbeforeCalculateTickRotation: function() {\r\n\t\t\thelpers.callCallback(this.options.beforeCalculateTickRotation, [this]);\r\n\t\t},\r\n\t\tcalculateTickRotation: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar context = me.ctx;\r\n\t\t\tvar globalDefaults = Chart.defaults.global;\r\n\t\t\tvar optionTicks = me.options.ticks;\r\n\r\n\t\t\t//Get the width of each grid by calculating the difference\r\n\t\t\t//between x offsets between 0 and 1.\r\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(optionTicks.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\tvar tickFontStyle = helpers.getValueOrDefault(optionTicks.fontStyle, globalDefaults.defaultFontStyle);\r\n\t\t\tvar tickFontFamily = helpers.getValueOrDefault(optionTicks.fontFamily, globalDefaults.defaultFontFamily);\r\n\t\t\tvar tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);\r\n\t\t\tcontext.font = tickLabelFont;\r\n\r\n\t\t\tvar firstWidth = context.measureText(me.ticks[0]).width;\r\n\t\t\tvar lastWidth = context.measureText(me.ticks[me.ticks.length - 1]).width;\r\n\t\t\tvar firstRotated;\r\n\r\n\t\t\tme.labelRotation = optionTicks.minRotation || 0;\r\n\t\t\tme.paddingRight = 0;\r\n\t\t\tme.paddingLeft = 0;\r\n\r\n\t\t\tif (me.options.display) {\r\n\t\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\t\tme.paddingRight = lastWidth / 2 + 3;\r\n\t\t\t\t\tme.paddingLeft = firstWidth / 2 + 3;\r\n\r\n\t\t\t\t\tif (!me.longestTextCache) {\r\n\t\t\t\t\t\tme.longestTextCache = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar originalLabelWidth = helpers.longestText(context, tickLabelFont, me.ticks, me.longestTextCache);\r\n\t\t\t\t\tvar labelWidth = originalLabelWidth;\r\n\t\t\t\t\tvar cosRotation;\r\n\t\t\t\t\tvar sinRotation;\r\n\r\n\t\t\t\t\t// Allow 3 pixels x2 padding either side for label readability\r\n\t\t\t\t\t// only the index matters for a dataset scale, but we want a consistent interface between scales\r\n\t\t\t\t\tvar tickWidth = me.getPixelForTick(1) - me.getPixelForTick(0) - 6;\r\n\r\n\t\t\t\t\t//Max label rotation can be set or default to 90 - also act as a loop counter\r\n\t\t\t\t\twhile (labelWidth > tickWidth && me.labelRotation < optionTicks.maxRotation) {\r\n\t\t\t\t\t\tcosRotation = Math.cos(helpers.toRadians(me.labelRotation));\r\n\t\t\t\t\t\tsinRotation = Math.sin(helpers.toRadians(me.labelRotation));\r\n\r\n\t\t\t\t\t\tfirstRotated = cosRotation * firstWidth;\r\n\r\n\t\t\t\t\t\t// We're right aligning the text now.\r\n\t\t\t\t\t\tif (firstRotated + tickFontSize / 2 > me.yLabelWidth) {\r\n\t\t\t\t\t\t\tme.paddingLeft = firstRotated + tickFontSize / 2;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tme.paddingRight = tickFontSize / 2;\r\n\r\n\t\t\t\t\t\tif (sinRotation * originalLabelWidth > me.maxHeight) {\r\n\t\t\t\t\t\t\t// go back one step\r\n\t\t\t\t\t\t\tme.labelRotation--;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tme.labelRotation++;\r\n\t\t\t\t\t\tlabelWidth = cosRotation * originalLabelWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (me.margins) {\r\n\t\t\t\tme.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0);\r\n\t\t\t\tme.paddingRight = Math.max(me.paddingRight - me.margins.right, 0);\r\n\t\t\t}\r\n\t\t},\r\n\t\tafterCalculateTickRotation: function() {\r\n\t\t\thelpers.callCallback(this.options.afterCalculateTickRotation, [this]);\r\n\t\t},\r\n\r\n\t\t//\r\n\r\n\t\tbeforeFit: function() {\r\n\t\t\thelpers.callCallback(this.options.beforeFit, [this]);\r\n\t\t},\r\n\t\tfit: function() {\r\n\t\t\tvar me = this;\r\n\t\t\t// Reset\r\n\t\t\tvar minSize = me.minSize = {\r\n\t\t\t\twidth: 0,\r\n\t\t\t\theight: 0\r\n\t\t\t};\r\n\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar globalDefaults = Chart.defaults.global;\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\t\t\tvar scaleLabelOpts = opts.scaleLabel;\r\n\t\t\tvar gridLineOpts = opts.gridLines;\r\n\t\t\tvar display = opts.display;\r\n\t\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\tvar tickFontStyle = helpers.getValueOrDefault(tickOpts.fontStyle, globalDefaults.defaultFontStyle);\r\n\t\t\tvar tickFontFamily = helpers.getValueOrDefault(tickOpts.fontFamily, globalDefaults.defaultFontFamily);\r\n\t\t\tvar tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);\r\n\r\n\t\t\tvar scaleLabelFontSize = helpers.getValueOrDefault(scaleLabelOpts.fontSize, globalDefaults.defaultFontSize);\r\n\r\n\t\t\tvar tickMarkLength = opts.gridLines.tickMarkLength;\r\n\r\n\t\t\t// Width\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\t// subtract the margins to line up with the chartArea if we are a full width scale\r\n\t\t\t\tminSize.width = me.isFullWidth() ? me.maxWidth - me.margins.left - me.margins.right : me.maxWidth;\r\n\t\t\t} else {\r\n\t\t\t\tminSize.width = display && gridLineOpts.drawTicks ? tickMarkLength : 0;\r\n\t\t\t}\r\n\r\n\t\t\t// height\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tminSize.height = display && gridLineOpts.drawTicks ? tickMarkLength : 0;\r\n\t\t\t} else {\r\n\t\t\t\tminSize.height = me.maxHeight; // fill all the height\r\n\t\t\t}\r\n\r\n\t\t\t// Are we showing a title for the scale?\r\n\t\t\tif (scaleLabelOpts.display && display) {\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\tminSize.height += (scaleLabelFontSize * 1.5);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tminSize.width += (scaleLabelFontSize * 1.5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (tickOpts.display && display) {\r\n\t\t\t\t// Don't bother fitting the ticks if we are not showing them\r\n\t\t\t\tif (!me.longestTextCache) {\r\n\t\t\t\t\tme.longestTextCache = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar largestTextWidth = helpers.longestText(me.ctx, tickLabelFont, me.ticks, me.longestTextCache);\r\n\t\t\t\tvar tallestLabelHeightInLines = helpers.numberOfLabelLines(me.ticks);\r\n\t\t\t\tvar lineSpace = tickFontSize * 0.5;\r\n\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\t// A horizontal axis is more constrained by the height.\r\n\t\t\t\t\tme.longestLabelWidth = largestTextWidth;\r\n\r\n\t\t\t\t\t// TODO - improve this calculation\r\n\t\t\t\t\tvar labelHeight = (Math.sin(helpers.toRadians(me.labelRotation)) * me.longestLabelWidth) + (tickFontSize * tallestLabelHeightInLines) + (lineSpace * tallestLabelHeightInLines);\r\n\r\n\t\t\t\t\tminSize.height = Math.min(me.maxHeight, minSize.height + labelHeight);\r\n\t\t\t\t\tme.ctx.font = tickLabelFont;\r\n\r\n\t\t\t\t\tvar firstLabelWidth = me.ctx.measureText(me.ticks[0]).width;\r\n\t\t\t\t\tvar lastLabelWidth = me.ctx.measureText(me.ticks[me.ticks.length - 1]).width;\r\n\r\n\t\t\t\t\t// Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned which means that the right padding is dominated\r\n\t\t\t\t\t// by the font height\r\n\t\t\t\t\tvar cosRotation = Math.cos(helpers.toRadians(me.labelRotation));\r\n\t\t\t\t\tvar sinRotation = Math.sin(helpers.toRadians(me.labelRotation));\r\n\t\t\t\t\tme.paddingLeft = me.labelRotation !== 0 ? (cosRotation * firstLabelWidth) + 3 : firstLabelWidth / 2 + 3; // add 3 px to move away from canvas edges\r\n\t\t\t\t\tme.paddingRight = me.labelRotation !== 0 ? (sinRotation * (tickFontSize / 2)) + 3 : lastLabelWidth / 2 + 3; // when rotated\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// A vertical axis is more constrained by the width. Labels are the dominant factor here, so get that length first\r\n\t\t\t\t\tvar maxLabelWidth = me.maxWidth - minSize.width;\r\n\r\n\t\t\t\t\t// Account for padding\r\n\t\t\t\t\tvar mirror = tickOpts.mirror;\r\n\t\t\t\t\tif (!mirror) {\r\n\t\t\t\t\t\tlargestTextWidth += me.options.ticks.padding;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// If mirrored text is on the inside so don't expand\r\n\t\t\t\t\t\tlargestTextWidth = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (largestTextWidth < maxLabelWidth) {\r\n\t\t\t\t\t\t// We don't need all the room\r\n\t\t\t\t\t\tminSize.width += largestTextWidth;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Expand to max size\r\n\t\t\t\t\t\tminSize.width = me.maxWidth;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tme.paddingTop = tickFontSize / 2;\r\n\t\t\t\t\tme.paddingBottom = tickFontSize / 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (me.margins) {\r\n\t\t\t\tme.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0);\r\n\t\t\t\tme.paddingTop = Math.max(me.paddingTop - me.margins.top, 0);\r\n\t\t\t\tme.paddingRight = Math.max(me.paddingRight - me.margins.right, 0);\r\n\t\t\t\tme.paddingBottom = Math.max(me.paddingBottom - me.margins.bottom, 0);\r\n\t\t\t}\r\n\r\n\t\t\tme.width = minSize.width;\r\n\t\t\tme.height = minSize.height;\r\n\r\n\t\t},\r\n\t\tafterFit: function() {\r\n\t\t\thelpers.callCallback(this.options.afterFit, [this]);\r\n\t\t},\r\n\r\n\t\t// Shared Methods\r\n\t\tisHorizontal: function() {\r\n\t\t\treturn this.options.position === \"top\" || this.options.position === \"bottom\";\r\n\t\t},\r\n\t\tisFullWidth: function() {\r\n\t\t\treturn (this.options.fullWidth);\r\n\t\t},\r\n\r\n\t\t// Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not\r\n\t\tgetRightValue: function(rawValue) {\r\n\t\t\t// Null and undefined values first\r\n\t\t\tif (rawValue === null || typeof(rawValue) === 'undefined') {\r\n\t\t\t\treturn NaN;\r\n\t\t\t}\r\n\t\t\t// isNaN(object) returns true, so make sure NaN is checking for a number\r\n\t\t\tif (typeof(rawValue) === 'number' && isNaN(rawValue)) {\r\n\t\t\t\treturn NaN;\r\n\t\t\t}\r\n\t\t\t// If it is in fact an object, dive in one more level\r\n\t\t\tif (typeof(rawValue) === \"object\") {\r\n\t\t\t\tif ((rawValue instanceof Date) || (rawValue.isValid)) {\r\n\t\t\t\t\treturn rawValue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn this.getRightValue(this.isHorizontal() ? rawValue.x : rawValue.y);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Value is good, return it\r\n\t\t\treturn rawValue;\r\n\t\t},\r\n\r\n\t\t// Used to get the value to display in the tooltip for the data at the given index\r\n\t\t// function getLabelForIndex(index, datasetIndex)\r\n\t\tgetLabelForIndex: helpers.noop,\r\n\r\n\t\t// Used to get data value locations.  Value can either be an index or a numerical value\r\n\t\tgetPixelForValue: helpers.noop,\r\n\r\n\t\t// Used to get the data value from a given pixel. This is the inverse of getPixelForValue\r\n\t\tgetValueForPixel: helpers.noop,\r\n\r\n\t\t// Used for tick location, should\r\n\t\tgetPixelForTick: function(index, includeOffset) {\r\n\t\t\tvar me = this;\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\r\n\t\t\t\tvar tickWidth = innerWidth / Math.max((me.ticks.length - ((me.options.gridLines.offsetGridLines) ? 0 : 1)), 1);\r\n\t\t\t\tvar pixel = (tickWidth * index) + me.paddingLeft;\r\n\r\n\t\t\t\tif (includeOffset) {\r\n\t\t\t\t\tpixel += tickWidth / 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar finalVal = me.left + Math.round(pixel);\r\n\t\t\t\tfinalVal += me.isFullWidth() ? me.margins.left : 0;\r\n\t\t\t\treturn finalVal;\r\n\t\t\t} else {\r\n\t\t\t\tvar innerHeight = me.height - (me.paddingTop + me.paddingBottom);\r\n\t\t\t\treturn me.top + (index * (innerHeight / (me.ticks.length - 1)));\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// Utility for getting the pixel location of a percentage of scale\r\n\t\tgetPixelForDecimal: function(decimal /*, includeOffset*/ ) {\r\n\t\t\tvar me = this;\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\r\n\t\t\t\tvar valueOffset = (innerWidth * decimal) + me.paddingLeft;\r\n\r\n\t\t\t\tvar finalVal = me.left + Math.round(valueOffset);\r\n\t\t\t\tfinalVal += me.isFullWidth() ? me.margins.left : 0;\r\n\t\t\t\treturn finalVal;\r\n\t\t\t} else {\r\n\t\t\t\treturn me.top + (decimal * me.height);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetBasePixel: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar min = me.min;\r\n\t\t\tvar max = me.max;\r\n\r\n\t\t\treturn me.getPixelForValue(\r\n\t\t\t\tme.beginAtZero? 0:\r\n\t\t\t\tmin < 0 && max < 0? max :\r\n\t\t\t\tmin > 0 && max > 0? min :\r\n\t\t\t\t0);\r\n\t\t},\r\n\r\n\t\t// Actualy draw the scale on the canvas\r\n\t\t// @param {rectangle} chartArea : the area of the chart to draw full grid lines on\r\n\t\tdraw: function(chartArea) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar options = me.options;\r\n\t\t\tif (!options.display) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar context = me.ctx;\r\n\t\t\tvar globalDefaults = Chart.defaults.global;\r\n\t\t\tvar optionTicks = options.ticks;\r\n\t\t\tvar gridLines = options.gridLines;\r\n\t\t\tvar scaleLabel = options.scaleLabel;\r\n\r\n\t\t\tvar isRotated = me.labelRotation !== 0;\r\n\t\t\tvar skipRatio;\r\n\t\t\tvar useAutoskipper = optionTicks.autoSkip;\r\n\t\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\t\t// figure out the maximum number of gridlines to show\r\n\t\t\tvar maxTicks;\r\n\t\t\tif (optionTicks.maxTicksLimit) {\r\n\t\t\t\tmaxTicks = optionTicks.maxTicksLimit;\r\n\t\t\t}\r\n\r\n\t\t\tvar tickFontColor = helpers.getValueOrDefault(optionTicks.fontColor, globalDefaults.defaultFontColor);\r\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(optionTicks.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\tvar tickFontStyle = helpers.getValueOrDefault(optionTicks.fontStyle, globalDefaults.defaultFontStyle);\r\n\t\t\tvar tickFontFamily = helpers.getValueOrDefault(optionTicks.fontFamily, globalDefaults.defaultFontFamily);\r\n\t\t\tvar tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);\r\n\t\t\tvar tl = gridLines.tickMarkLength;\r\n\t\t\tvar borderDash = helpers.getValueOrDefault(gridLines.borderDash, globalDefaults.borderDash);\r\n\t\t\tvar borderDashOffset = helpers.getValueOrDefault(gridLines.borderDashOffset, globalDefaults.borderDashOffset);\r\n\r\n\t\t\tvar scaleLabelFontColor = helpers.getValueOrDefault(scaleLabel.fontColor, globalDefaults.defaultFontColor);\r\n\t\t\tvar scaleLabelFontSize = helpers.getValueOrDefault(scaleLabel.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\tvar scaleLabelFontStyle = helpers.getValueOrDefault(scaleLabel.fontStyle, globalDefaults.defaultFontStyle);\r\n\t\t\tvar scaleLabelFontFamily = helpers.getValueOrDefault(scaleLabel.fontFamily, globalDefaults.defaultFontFamily);\r\n\t\t\tvar scaleLabelFont = helpers.fontString(scaleLabelFontSize, scaleLabelFontStyle, scaleLabelFontFamily);\r\n\r\n\t\t\tvar labelRotationRadians = helpers.toRadians(me.labelRotation);\r\n\t\t\tvar cosRotation = Math.cos(labelRotationRadians);\r\n\t\t\tvar longestRotatedLabel = me.longestLabelWidth * cosRotation;\r\n\r\n\t\t\t// Make sure we draw text in the correct color and font\r\n\t\t\tcontext.fillStyle = tickFontColor;\r\n\r\n\t\t\tvar itemsToDraw = [];\r\n\r\n\t\t\tif (isHorizontal) {\r\n\t\t\t\tskipRatio = false;\r\n\r\n\t\t\t\t// Only calculate the skip ratio with the half width of longestRotateLabel if we got an actual rotation\r\n\t\t\t\t// See #2584\r\n\t\t\t\tif (isRotated) {\r\n\t\t\t\t\tlongestRotatedLabel /= 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length > (me.width - (me.paddingLeft + me.paddingRight))) {\r\n\t\t\t\t\tskipRatio = 1 + Math.floor(((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length) / (me.width - (me.paddingLeft + me.paddingRight)));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if they defined a max number of optionTicks,\r\n\t\t\t\t// increase skipRatio until that number is met\r\n\t\t\t\tif (maxTicks && me.ticks.length > maxTicks) {\r\n\t\t\t\t\twhile (!skipRatio || me.ticks.length / (skipRatio || 1) > maxTicks) {\r\n\t\t\t\t\t\tif (!skipRatio) {\r\n\t\t\t\t\t\t\tskipRatio = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tskipRatio += 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!useAutoskipper) {\r\n\t\t\t\t\tskipRatio = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar xTickStart = options.position === \"right\" ? me.left : me.right - tl;\r\n\t\t\tvar xTickEnd = options.position === \"right\" ? me.left + tl : me.right;\r\n\t\t\tvar yTickStart = options.position === \"bottom\" ? me.top : me.bottom - tl;\r\n\t\t\tvar yTickEnd = options.position === \"bottom\" ? me.top + tl : me.bottom;\r\n\r\n\t\t\thelpers.each(me.ticks, function(label, index) {\r\n\t\t\t\t// If the callback returned a null or undefined value, do not draw this line\r\n\t\t\t\tif (label === undefined || label === null) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar isLastTick = me.ticks.length === index + 1;\r\n\r\n\t\t\t\t// Since we always show the last tick,we need may need to hide the last shown one before\r\n\t\t\t\tvar shouldSkip = (skipRatio > 1 && index % skipRatio > 0) || (index % skipRatio === 0 && index + skipRatio >= me.ticks.length);\r\n\t\t\t\tif (shouldSkip && !isLastTick || (label === undefined || label === null)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar lineWidth, lineColor;\r\n\t\t\t\tif (index === (typeof me.zeroLineIndex !== 'undefined' ? me.zeroLineIndex : 0)) {\r\n\t\t\t\t\t// Draw the first index specially\r\n\t\t\t\t\tlineWidth = gridLines.zeroLineWidth;\r\n\t\t\t\t\tlineColor = gridLines.zeroLineColor;\r\n\t\t\t\t} else  {\r\n\t\t\t\t\tlineWidth = helpers.getValueAtIndexOrDefault(gridLines.lineWidth, index);\r\n\t\t\t\t\tlineColor = helpers.getValueAtIndexOrDefault(gridLines.color, index);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Common properties\r\n\t\t\t\tvar tx1, ty1, tx2, ty2, x1, y1, x2, y2, labelX, labelY;\r\n\t\t\t\tvar textAlign, textBaseline = 'middle';\r\n\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\tif (!isRotated) {\r\n\t\t\t\t\t\ttextBaseline = options.position === 'top' ? 'bottom' : 'top';\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttextAlign = isRotated ? 'right' : 'center';\r\n\r\n\t\t\t\t\tvar xLineValue = me.getPixelForTick(index) + helpers.aliasPixel(lineWidth); // xvalues for grid lines\r\n\t\t\t\t\tlabelX = me.getPixelForTick(index, gridLines.offsetGridLines) + optionTicks.labelOffset; // x values for optionTicks (need to consider offsetLabel option)\r\n\t\t\t\t\tlabelY = (isRotated) ? me.top + 12 : options.position === 'top' ? me.bottom - tl : me.top + tl;\r\n\r\n\t\t\t\t\ttx1 = tx2 = x1 = x2 = xLineValue;\r\n\t\t\t\t\tty1 = yTickStart;\r\n\t\t\t\t\tty2 = yTickEnd;\r\n\t\t\t\t\ty1 = chartArea.top;\r\n\t\t\t\t\ty2 = chartArea.bottom;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.position === 'left') {\r\n\t\t\t\t\t\tif (optionTicks.mirror) {\r\n\t\t\t\t\t\t\tlabelX = me.right + optionTicks.padding;\r\n\t\t\t\t\t\t\ttextAlign = 'left';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlabelX = me.right - optionTicks.padding;\r\n\t\t\t\t\t\t\ttextAlign = 'right';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// right side\r\n\t\t\t\t\t\tif (optionTicks.mirror) {\r\n\t\t\t\t\t\t\tlabelX = me.left - optionTicks.padding;\r\n\t\t\t\t\t\t\ttextAlign = 'right';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlabelX = me.left + optionTicks.padding;\r\n\t\t\t\t\t\t\ttextAlign = 'left';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar yLineValue = me.getPixelForTick(index); // xvalues for grid lines\r\n\t\t\t\t\tyLineValue += helpers.aliasPixel(lineWidth);\r\n\t\t\t\t\tlabelY = me.getPixelForTick(index, gridLines.offsetGridLines);\r\n\r\n\t\t\t\t\ttx1 = xTickStart;\r\n\t\t\t\t\ttx2 = xTickEnd;\r\n\t\t\t\t\tx1 = chartArea.left;\r\n\t\t\t\t\tx2 = chartArea.right;\r\n\t\t\t\t\tty1 = ty2 = y1 = y2 = yLineValue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\titemsToDraw.push({\r\n\t\t\t\t\ttx1: tx1,\r\n\t\t\t\t\tty1: ty1,\r\n\t\t\t\t\ttx2: tx2,\r\n\t\t\t\t\tty2: ty2,\r\n\t\t\t\t\tx1: x1,\r\n\t\t\t\t\ty1: y1,\r\n\t\t\t\t\tx2: x2,\r\n\t\t\t\t\ty2: y2,\r\n\t\t\t\t\tlabelX: labelX,\r\n\t\t\t\t\tlabelY: labelY,\r\n\t\t\t\t\tglWidth: lineWidth,\r\n\t\t\t\t\tglColor: lineColor,\r\n\t\t\t\t\tglBorderDash: borderDash,\r\n\t\t\t\t\tglBorderDashOffset: borderDashOffset,\r\n\t\t\t\t\trotation: -1 * labelRotationRadians,\r\n\t\t\t\t\tlabel: label,\r\n\t\t\t\t\ttextBaseline: textBaseline,\r\n\t\t\t\t\ttextAlign: textAlign\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t\t// Draw all of the tick labels, tick marks, and grid lines at the correct places\r\n\t\t\thelpers.each(itemsToDraw, function(itemToDraw) {\r\n\t\t\t\tif (gridLines.display) {\r\n\t\t\t\t\tcontext.save();\r\n\t\t\t\t\tcontext.lineWidth = itemToDraw.glWidth;\r\n\t\t\t\t\tcontext.strokeStyle = itemToDraw.glColor;\r\n\t\t\t\t\tif (context.setLineDash) {\r\n\t\t\t\t\t\tcontext.setLineDash(itemToDraw.glBorderDash);\r\n\t\t\t\t\t\tcontext.lineDashOffset = itemToDraw.glBorderDashOffset;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontext.beginPath();\r\n\r\n\t\t\t\t\tif (gridLines.drawTicks) {\r\n\t\t\t\t\t\tcontext.moveTo(itemToDraw.tx1, itemToDraw.ty1);\r\n\t\t\t\t\t\tcontext.lineTo(itemToDraw.tx2, itemToDraw.ty2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (gridLines.drawOnChartArea) {\r\n\t\t\t\t\t\tcontext.moveTo(itemToDraw.x1, itemToDraw.y1);\r\n\t\t\t\t\t\tcontext.lineTo(itemToDraw.x2, itemToDraw.y2);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontext.stroke();\r\n\t\t\t\t\tcontext.restore();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (optionTicks.display) {\r\n\t\t\t\t\tcontext.save();\r\n\t\t\t\t\tcontext.translate(itemToDraw.labelX, itemToDraw.labelY);\r\n\t\t\t\t\tcontext.rotate(itemToDraw.rotation);\r\n\t\t\t\t\tcontext.font = tickLabelFont;\r\n\t\t\t\t\tcontext.textBaseline = itemToDraw.textBaseline;\r\n\t\t\t\t\tcontext.textAlign = itemToDraw.textAlign;\r\n\r\n\t\t\t\t\tvar label = itemToDraw.label;\r\n\t\t\t\t\tif (helpers.isArray(label)) {\r\n\t\t\t\t\t\tfor (var i = 0, y = 0; i < label.length; ++i) {\r\n\t\t\t\t\t\t\t// We just make sure the multiline element is a string here..\r\n\t\t\t\t\t\t\tcontext.fillText('' + label[i], 0, y);\r\n\t\t\t\t\t\t\t// apply same lineSpacing as calculated @ L#320\r\n\t\t\t\t\t\t\ty += (tickFontSize * 1.5);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcontext.fillText(label, 0, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontext.restore();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (scaleLabel.display) {\r\n\t\t\t\t// Draw the scale label\r\n\t\t\t\tvar scaleLabelX;\r\n\t\t\t\tvar scaleLabelY;\r\n\t\t\t\tvar rotation = 0;\r\n\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\tscaleLabelX = me.left + ((me.right - me.left) / 2); // midpoint of the width\r\n\t\t\t\t\tscaleLabelY = options.position === 'bottom' ? me.bottom - (scaleLabelFontSize / 2) : me.top + (scaleLabelFontSize / 2);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar isLeft = options.position === 'left';\r\n\t\t\t\t\tscaleLabelX = isLeft ? me.left + (scaleLabelFontSize / 2) : me.right - (scaleLabelFontSize / 2);\r\n\t\t\t\t\tscaleLabelY = me.top + ((me.bottom - me.top) / 2);\r\n\t\t\t\t\trotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontext.save();\r\n\t\t\t\tcontext.translate(scaleLabelX, scaleLabelY);\r\n\t\t\t\tcontext.rotate(rotation);\r\n\t\t\t\tcontext.textAlign = 'center';\r\n\t\t\t\tcontext.textBaseline = 'middle';\r\n\t\t\t\tcontext.fillStyle = scaleLabelFontColor; // render in correct colour\r\n\t\t\t\tcontext.font = scaleLabelFont;\r\n\t\t\t\tcontext.fillText(scaleLabel.labelString, 0, 0);\r\n\t\t\t\tcontext.restore();\r\n\t\t\t}\r\n\r\n\t\t\tif (gridLines.drawBorder) {\r\n\t\t\t\t// Draw the line at the edge of the axis\r\n\t\t\t\tcontext.lineWidth = helpers.getValueAtIndexOrDefault(gridLines.lineWidth, 0);\r\n\t\t\t\tcontext.strokeStyle = helpers.getValueAtIndexOrDefault(gridLines.color, 0);\r\n\t\t\t\tvar x1 = me.left,\r\n\t\t\t\t\tx2 = me.right,\r\n\t\t\t\t\ty1 = me.top,\r\n\t\t\t\t\ty2 = me.bottom;\r\n\r\n\t\t\t\tvar aliasPixel = helpers.aliasPixel(context.lineWidth);\r\n\t\t\t\tif (isHorizontal) {\r\n\t\t\t\t\ty1 = y2 = options.position === 'top' ? me.bottom : me.top;\r\n\t\t\t\t\ty1 += aliasPixel;\r\n\t\t\t\t\ty2 += aliasPixel;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx1 = x2 = options.position === 'left' ? me.right : me.left;\r\n\t\t\t\t\tx1 += aliasPixel;\r\n\t\t\t\t\tx2 += aliasPixel;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontext.beginPath();\r\n\t\t\t\tcontext.moveTo(x1, y1);\r\n\t\t\t\tcontext.lineTo(x2, y2);\r\n\t\t\t\tcontext.stroke();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],32:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.scaleService = {\r\n\t\t// Scale registration object. Extensions can register new scale types (such as log or DB scales) and then\r\n\t\t// use the new chart options to grab the correct scale\r\n\t\tconstructors: {},\r\n\t\t// Use a registration function so that we can move to an ES6 map when we no longer need to support\r\n\t\t// old browsers\r\n\r\n\t\t// Scale config defaults\r\n\t\tdefaults: {},\r\n\t\tregisterScaleType: function(type, scaleConstructor, defaults) {\r\n\t\t\tthis.constructors[type] = scaleConstructor;\r\n\t\t\tthis.defaults[type] = helpers.clone(defaults);\r\n\t\t},\r\n\t\tgetScaleConstructor: function(type) {\r\n\t\t\treturn this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;\r\n\t\t},\r\n\t\tgetScaleDefaults: function(type) {\r\n\t\t\t// Return the scale defaults merged with the global settings so that we always use the latest ones\r\n\t\t\treturn this.defaults.hasOwnProperty(type) ? helpers.scaleMerge(Chart.defaults.scale, this.defaults[type]) : {};\r\n\t\t},\r\n\t\tupdateScaleDefaults: function(type, additions) {\r\n\t\t\tvar defaults = this.defaults;\r\n\t\t\tif (defaults.hasOwnProperty(type)) {\r\n\t\t\t\tdefaults[type] = helpers.extend(defaults[type], additions);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddScalesToLayout: function(chartInstance) {\r\n\t\t\t// Adds each scale to the chart.boxes array to be sized accordingly\r\n\t\t\thelpers.each(chartInstance.scales, function(scale) {\r\n\t\t\t\tChart.layoutService.addBox(chartInstance, scale);\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n};\r\n},{}],33:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.global.title = {\r\n\t\tdisplay: false,\r\n\t\tposition: 'top',\r\n\t\tfullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes)\r\n\r\n\t\tfontStyle: 'bold',\r\n\t\tpadding: 10,\r\n\r\n\t\t// actual title\r\n\t\ttext: ''\r\n\t};\r\n\r\n\tvar noop = helpers.noop;\r\n\tChart.Title = Chart.Element.extend({\r\n\r\n\t\tinitialize: function(config) {\r\n\t\t\tvar me = this;\r\n\t\t\thelpers.extend(me, config);\r\n\t\t\tme.options = helpers.configMerge(Chart.defaults.global.title, config.options);\r\n\r\n\t\t\t// Contains hit boxes for each dataset (in dataset order)\r\n\t\t\tme.legendHitBoxes = [];\r\n\t\t},\r\n\r\n\t\t// These methods are ordered by lifecyle. Utilities then follow.\r\n\r\n\t\tbeforeUpdate: function () {\r\n\t\t\tvar chartOpts = this.chart.options;\r\n\t\t\tif (chartOpts && chartOpts.title) {\r\n\t\t\t\tthis.options = helpers.configMerge(Chart.defaults.global.title, chartOpts.title);\r\n\t\t\t}\r\n\t\t},\r\n\t\tupdate: function(maxWidth, maxHeight, margins) {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\r\n\t\t\tme.beforeUpdate();\r\n\r\n\t\t\t// Absorb the master measurements\r\n\t\t\tme.maxWidth = maxWidth;\r\n\t\t\tme.maxHeight = maxHeight;\r\n\t\t\tme.margins = margins;\r\n\r\n\t\t\t// Dimensions\r\n\t\t\tme.beforeSetDimensions();\r\n\t\t\tme.setDimensions();\r\n\t\t\tme.afterSetDimensions();\r\n\t\t\t// Labels\r\n\t\t\tme.beforeBuildLabels();\r\n\t\t\tme.buildLabels();\r\n\t\t\tme.afterBuildLabels();\r\n\r\n\t\t\t// Fit\r\n\t\t\tme.beforeFit();\r\n\t\t\tme.fit();\r\n\t\t\tme.afterFit();\r\n\t\t\t//\r\n\t\t\tme.afterUpdate();\r\n\r\n\t\t\treturn me.minSize;\r\n\r\n\t\t},\r\n\t\tafterUpdate: noop,\r\n\r\n\t\t//\r\n\r\n\t\tbeforeSetDimensions: noop,\r\n\t\tsetDimensions: function() {\r\n\t\t\tvar me = this;\r\n\t\t\t// Set the unconstrained dimension before label rotation\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\t// Reset position before calculating rotation\r\n\t\t\t\tme.width = me.maxWidth;\r\n\t\t\t\tme.left = 0;\r\n\t\t\t\tme.right = me.width;\r\n\t\t\t} else {\r\n\t\t\t\tme.height = me.maxHeight;\r\n\r\n\t\t\t\t// Reset position before calculating rotation\r\n\t\t\t\tme.top = 0;\r\n\t\t\t\tme.bottom = me.height;\r\n\t\t\t}\r\n\r\n\t\t\t// Reset padding\r\n\t\t\tme.paddingLeft = 0;\r\n\t\t\tme.paddingTop = 0;\r\n\t\t\tme.paddingRight = 0;\r\n\t\t\tme.paddingBottom = 0;\r\n\r\n\t\t\t// Reset minSize\r\n\t\t\tme.minSize = {\r\n\t\t\t\twidth: 0,\r\n\t\t\t\theight: 0\r\n\t\t\t};\r\n\t\t},\r\n\t\tafterSetDimensions: noop,\r\n\r\n\t\t//\r\n\r\n\t\tbeforeBuildLabels: noop,\r\n\t\tbuildLabels: noop,\r\n\t\tafterBuildLabels: noop,\r\n\r\n\t\t//\r\n\r\n\t\tbeforeFit: noop,\r\n\t\tfit: function() {\r\n\t\t\tvar me = this,\r\n\t\t\t\tvalueOrDefault = helpers.getValueOrDefault,\r\n\t\t\t\topts = me.options,\r\n\t\t\t\tglobalDefaults = Chart.defaults.global,\r\n\t\t\t\tdisplay = opts.display,\r\n\t\t\t\tfontSize = valueOrDefault(opts.fontSize, globalDefaults.defaultFontSize),\r\n\t\t\t\tminSize = me.minSize;\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tminSize.width = me.maxWidth; // fill all the width\r\n\t\t\t\tminSize.height = display ? fontSize + (opts.padding * 2) : 0;\r\n\t\t\t} else {\r\n\t\t\t\tminSize.width = display ? fontSize + (opts.padding * 2) : 0;\r\n\t\t\t\tminSize.height = me.maxHeight; // fill all the height\r\n\t\t\t}\r\n\r\n\t\t\tme.width = minSize.width;\r\n\t\t\tme.height = minSize.height;\r\n\r\n\t\t},\r\n\t\tafterFit: noop,\r\n\r\n\t\t// Shared Methods\r\n\t\tisHorizontal: function() {\r\n\t\t\tvar pos = this.options.position;\r\n\t\t\treturn pos === \"top\" || pos === \"bottom\";\r\n\t\t},\r\n\r\n\t\t// Actualy draw the title block on the canvas\r\n\t\tdraw: function() {\r\n\t\t\tvar me = this,\r\n\t\t\t\tctx = me.ctx,\r\n\t\t\t\tvalueOrDefault = helpers.getValueOrDefault,\r\n\t\t\t\topts = me.options,\r\n\t\t\t\tglobalDefaults = Chart.defaults.global;\r\n\r\n\t\t\tif (opts.display) {\r\n\t\t\t\tvar fontSize = valueOrDefault(opts.fontSize, globalDefaults.defaultFontSize),\r\n\t\t\t\t\tfontStyle = valueOrDefault(opts.fontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\t\t\tfontFamily = valueOrDefault(opts.fontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\t\t\ttitleFont = helpers.fontString(fontSize, fontStyle, fontFamily),\r\n\t\t\t\t\trotation = 0,\r\n\t\t\t\t\ttitleX,\r\n\t\t\t\t\ttitleY,\r\n\t\t\t\t\ttop = me.top,\r\n\t\t\t\t\tleft = me.left,\r\n\t\t\t\t\tbottom = me.bottom,\r\n\t\t\t\t\tright = me.right;\r\n\r\n\t\t\t\tctx.fillStyle = valueOrDefault(opts.fontColor, globalDefaults.defaultFontColor); // render in correct colour\r\n\t\t\t\tctx.font = titleFont;\r\n\r\n\t\t\t\t// Horizontal\r\n\t\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\t\ttitleX = left + ((right - left) / 2); // midpoint of the width\r\n\t\t\t\t\ttitleY = top + ((bottom - top) / 2); // midpoint of the height\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttitleX = opts.position === 'left' ? left + (fontSize / 2) : right - (fontSize / 2);\r\n\t\t\t\t\ttitleY = top + ((bottom - top) / 2);\r\n\t\t\t\t\trotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.translate(titleX, titleY);\r\n\t\t\t\tctx.rotate(rotation);\r\n\t\t\t\tctx.textAlign = 'center';\r\n\t\t\t\tctx.textBaseline = 'middle';\r\n\t\t\t\tctx.fillText(opts.text, 0, 0);\r\n\t\t\t\tctx.restore();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t// Register the title plugin\r\n\tChart.plugins.register({\r\n\t\tbeforeInit: function(chartInstance) {\r\n\t\t\tvar opts = chartInstance.options;\r\n\t\t\tvar titleOpts = opts.title;\r\n\r\n\t\t\tif (titleOpts) {\r\n\t\t\t\tchartInstance.titleBlock = new Chart.Title({\r\n\t\t\t\t\tctx: chartInstance.chart.ctx,\r\n\t\t\t\t\toptions: titleOpts,\r\n\t\t\t\t\tchart: chartInstance\r\n\t\t\t\t});\r\n\r\n\t\t\t\tChart.layoutService.addBox(chartInstance, chartInstance.titleBlock);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],34:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tChart.defaults.global.tooltips = {\r\n\t\tenabled: true,\r\n\t\tcustom: null,\r\n\t\tmode: 'single',\r\n\t\tbackgroundColor: \"rgba(0,0,0,0.8)\",\r\n\t\ttitleFontStyle: \"bold\",\r\n\t\ttitleSpacing: 2,\r\n\t\ttitleMarginBottom: 6,\r\n\t\ttitleFontColor: \"#fff\",\r\n\t\ttitleAlign: \"left\",\r\n\t\tbodySpacing: 2,\r\n\t\tbodyFontColor: \"#fff\",\r\n\t\tbodyAlign: \"left\",\r\n\t\tfooterFontStyle: \"bold\",\r\n\t\tfooterSpacing: 2,\r\n\t\tfooterMarginTop: 6,\r\n\t\tfooterFontColor: \"#fff\",\r\n\t\tfooterAlign: \"left\",\r\n\t\tyPadding: 6,\r\n\t\txPadding: 6,\r\n\t\tyAlign : 'center',\r\n\t\txAlign : 'center',\r\n\t\tcaretSize: 5,\r\n\t\tcornerRadius: 6,\r\n\t\tmultiKeyBackground: '#fff',\r\n\t\tcallbacks: {\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeTitle: helpers.noop,\r\n\t\t\ttitle: function(tooltipItems, data) {\r\n\t\t\t\t// Pick first xLabel for now\r\n\t\t\t\tvar title = '';\r\n\t\t\t\tvar labels = data.labels;\r\n\t\t\t\tvar labelCount = labels ? labels.length : 0;\r\n\r\n\t\t\t\tif (tooltipItems.length > 0) {\r\n\t\t\t\t\tvar item = tooltipItems[0];\r\n\r\n\t\t\t\t\tif (item.xLabel) {\r\n\t\t\t\t\t\ttitle = item.xLabel;\r\n\t\t\t\t\t} else if (labelCount > 0 && item.index < labelCount) {\r\n\t\t\t\t\t\ttitle = labels[item.index];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn title;\r\n\t\t\t},\r\n\t\t\tafterTitle: helpers.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeBody: helpers.noop,\r\n\r\n\t\t\t// Args are: (tooltipItem, data)\r\n\t\t\tbeforeLabel: helpers.noop,\r\n\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\tvar datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';\r\n\t\t\t\treturn datasetLabel + ': ' + tooltipItem.yLabel;\r\n\t\t\t},\r\n\t\t\tlabelColor: function(tooltipItem, chartInstance) {\r\n\t\t\t\tvar meta = chartInstance.getDatasetMeta(tooltipItem.datasetIndex);\r\n\t\t\t\tvar activeElement = meta.data[tooltipItem.index];\r\n\t\t\t\tvar view = activeElement._view;\r\n\t\t\t\treturn {\r\n\t\t\t\t\tborderColor: view.borderColor,\r\n\t\t\t\t\tbackgroundColor: view.backgroundColor\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tafterLabel: helpers.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tafterBody: helpers.noop,\r\n\r\n\t\t\t// Args are: (tooltipItems, data)\r\n\t\t\tbeforeFooter: helpers.noop,\r\n\t\t\tfooter: helpers.noop,\r\n\t\t\tafterFooter: helpers.noop\r\n\t\t}\r\n\t};\r\n\r\n\t// Helper to push or concat based on if the 2nd parameter is an array or not\r\n\tfunction pushOrConcat(base, toPush) {\r\n\t\tif (toPush) {\r\n\t\t\tif (helpers.isArray(toPush)) {\r\n\t\t\t\t//base = base.concat(toPush);\r\n\t\t\t\tArray.prototype.push.apply(base, toPush);\r\n\t\t\t} else {\r\n\t\t\t\tbase.push(toPush);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn base;\r\n\t}\r\n\r\n\tfunction getAveragePosition(elements) {\r\n\t\tif (!elements.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar i, len;\r\n\t\tvar xPositions = [];\r\n\t\tvar yPositions = [];\r\n\r\n\t\tfor (i = 0, len = elements.length; i < len; ++i) {\r\n\t\t\tvar el = elements[i];\r\n\t\t\tif (el && el.hasValue()){\r\n\t\t\t\tvar pos = el.tooltipPosition();\r\n\t\t\t\txPositions.push(pos.x);\r\n\t\t\t\tyPositions.push(pos.y);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar x = 0,\r\n\t\t\ty = 0;\r\n\t\tfor (i = 0; i < xPositions.length; ++i) {\r\n\t\t\tif (xPositions[ i ]) {\r\n\t\t\t\tx += xPositions[i];\r\n\t\t\t\ty += yPositions[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tx: Math.round(x / xPositions.length),\r\n\t\t\ty: Math.round(y / xPositions.length)\r\n\t\t};\r\n\t}\r\n\r\n\t// Private helper to create a tooltip iteam model\r\n\t// @param element : the chart element (point, arc, bar) to create the tooltip item for\r\n\t// @return : new tooltip item\r\n\tfunction createTooltipItem(element) {\r\n\t\tvar xScale = element._xScale;\r\n\t\tvar yScale = element._yScale || element._scale; // handle radar || polarArea charts\r\n\t\tvar index = element._index,\r\n\t\t\tdatasetIndex = element._datasetIndex;\r\n\r\n\t\treturn {\r\n\t\t\txLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\t\tyLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '',\r\n\t\t\tindex: index,\r\n\t\t\tdatasetIndex: datasetIndex\r\n\t\t};\r\n\t}\r\n\r\n\tChart.Tooltip = Chart.Element.extend({\r\n\t\tinitialize: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar globalDefaults = Chart.defaults.global;\r\n\t\t\tvar tooltipOpts = me._options;\r\n\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\r\n\r\n\t\t\thelpers.extend(me, {\r\n\t\t\t\t_model: {\r\n\t\t\t\t\t// Positioning\r\n\t\t\t\t\txPadding: tooltipOpts.xPadding,\r\n\t\t\t\t\tyPadding: tooltipOpts.yPadding,\r\n\t\t\t\t\txAlign : tooltipOpts.xAlign,\r\n\t\t\t\t\tyAlign : tooltipOpts.yAlign,\r\n\r\n\t\t\t\t\t// Body\r\n\t\t\t\t\tbodyFontColor: tooltipOpts.bodyFontColor,\r\n\t\t\t\t\t_bodyFontFamily: getValueOrDefault(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\t\t\t_bodyFontStyle: getValueOrDefault(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\t\t\t_bodyAlign: tooltipOpts.bodyAlign,\r\n\t\t\t\t\tbodyFontSize: getValueOrDefault(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize),\r\n\t\t\t\t\tbodySpacing: tooltipOpts.bodySpacing,\r\n\r\n\t\t\t\t\t// Title\r\n\t\t\t\t\ttitleFontColor: tooltipOpts.titleFontColor,\r\n\t\t\t\t\t_titleFontFamily: getValueOrDefault(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\t\t\t_titleFontStyle: getValueOrDefault(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\t\t\ttitleFontSize: getValueOrDefault(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize),\r\n\t\t\t\t\t_titleAlign: tooltipOpts.titleAlign,\r\n\t\t\t\t\ttitleSpacing: tooltipOpts.titleSpacing,\r\n\t\t\t\t\ttitleMarginBottom: tooltipOpts.titleMarginBottom,\r\n\r\n\t\t\t\t\t// Footer\r\n\t\t\t\t\tfooterFontColor: tooltipOpts.footerFontColor,\r\n\t\t\t\t\t_footerFontFamily: getValueOrDefault(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\t\t\t_footerFontStyle: getValueOrDefault(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\t\t\tfooterFontSize: getValueOrDefault(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize),\r\n\t\t\t\t\t_footerAlign: tooltipOpts.footerAlign,\r\n\t\t\t\t\tfooterSpacing: tooltipOpts.footerSpacing,\r\n\t\t\t\t\tfooterMarginTop: tooltipOpts.footerMarginTop,\r\n\r\n\t\t\t\t\t// Appearance\r\n\t\t\t\t\tcaretSize: tooltipOpts.caretSize,\r\n\t\t\t\t\tcornerRadius: tooltipOpts.cornerRadius,\r\n\t\t\t\t\tbackgroundColor: tooltipOpts.backgroundColor,\r\n\t\t\t\t\topacity: 0,\r\n\t\t\t\t\tlegendColorBackground: tooltipOpts.multiKeyBackground\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t// Get the title\r\n\t\t// Args are: (tooltipItem, data)\r\n\t\tgetTitle: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me._options;\r\n\t\t\tvar callbacks = opts.callbacks;\r\n\r\n\t\t\tvar beforeTitle = callbacks.beforeTitle.apply(me, arguments),\r\n\t\t\t\ttitle = callbacks.title.apply(me, arguments),\r\n\t\t\t\tafterTitle = callbacks.afterTitle.apply(me, arguments);\r\n\r\n\t\t\tvar lines = [];\r\n\t\t\tlines = pushOrConcat(lines, beforeTitle);\r\n\t\t\tlines = pushOrConcat(lines, title);\r\n\t\t\tlines = pushOrConcat(lines, afterTitle);\r\n\r\n\t\t\treturn lines;\r\n\t\t},\r\n\r\n\t\t// Args are: (tooltipItem, data)\r\n\t\tgetBeforeBody: function() {\r\n\t\t\tvar lines = this._options.callbacks.beforeBody.apply(this, arguments);\r\n\t\t\treturn helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];\r\n\t\t},\r\n\r\n\t\t// Args are: (tooltipItem, data)\r\n\t\tgetBody: function(tooltipItems, data) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar callbacks = me._options.callbacks;\r\n\t\t\tvar bodyItems = [];\r\n\r\n\t\t\thelpers.each(tooltipItems, function(tooltipItem) {\r\n\t\t\t\tvar bodyItem = {\r\n\t\t\t\t\tbefore: [],\r\n\t\t\t\t\tlines: [],\r\n\t\t\t\t\tafter: []\r\n\t\t\t\t};\r\n\t\t\t\tpushOrConcat(bodyItem.before, callbacks.beforeLabel.call(me, tooltipItem, data));\r\n\t\t\t\tpushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data));\r\n\t\t\t\tpushOrConcat(bodyItem.after, callbacks.afterLabel.call(me, tooltipItem, data));\r\n\r\n\t\t\t\tbodyItems.push(bodyItem);\r\n\t\t\t});\r\n\r\n\t\t\treturn bodyItems;\r\n\t\t},\r\n\r\n\t\t// Args are: (tooltipItem, data)\r\n\t\tgetAfterBody: function() {\r\n\t\t\tvar lines = this._options.callbacks.afterBody.apply(this, arguments);\r\n\t\t\treturn helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];\r\n\t\t},\r\n\r\n\t\t// Get the footer and beforeFooter and afterFooter lines\r\n\t\t// Args are: (tooltipItem, data)\r\n\t\tgetFooter: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar callbacks = me._options.callbacks;\r\n\r\n\t\t\tvar beforeFooter = callbacks.beforeFooter.apply(me, arguments);\r\n\t\t\tvar footer = callbacks.footer.apply(me, arguments);\r\n\t\t\tvar afterFooter = callbacks.afterFooter.apply(me, arguments);\r\n\r\n\t\t\tvar lines = [];\r\n\t\t\tlines = pushOrConcat(lines, beforeFooter);\r\n\t\t\tlines = pushOrConcat(lines, footer);\r\n\t\t\tlines = pushOrConcat(lines, afterFooter);\r\n\r\n\t\t\treturn lines;\r\n\t\t},\r\n\r\n\t\tupdate: function(changed) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me._options;\r\n\t\t\tvar model = me._model;\r\n\t\t\tvar active = me._active;\r\n\r\n\t\t\tvar data = me._data;\r\n\t\t\tvar chartInstance = me._chartInstance;\r\n\r\n\t\t\tvar i, len;\r\n\r\n\t\t\tif (active.length) {\r\n\t\t\t\tmodel.opacity = 1;\r\n\r\n\t\t\t\tvar labelColors = [],\r\n\t\t\t\t\ttooltipPosition = getAveragePosition(active);\r\n\r\n\t\t\t\tvar tooltipItems = [];\r\n\t\t\t\tfor (i = 0, len = active.length; i < len; ++i) {\r\n\t\t\t\t\ttooltipItems.push(createTooltipItem(active[i]));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the user provided a sorting function, use it to modify the tooltip items\r\n\t\t\t\tif (opts.itemSort) {\r\n\t\t\t\t\ttooltipItems = tooltipItems.sort(function(a,b) {\r\n\t\t\t\t\t\treturn opts.itemSort(a,b, data);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If there is more than one item, show color items\r\n\t\t\t\tif (active.length > 1) {\r\n\t\t\t\t\thelpers.each(tooltipItems, function(tooltipItem) {\r\n\t\t\t\t\t\tlabelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, chartInstance));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Build the Text Lines\r\n\t\t\t\thelpers.extend(model, {\r\n\t\t\t\t\ttitle: me.getTitle(tooltipItems, data),\r\n\t\t\t\t\tbeforeBody: me.getBeforeBody(tooltipItems, data),\r\n\t\t\t\t\tbody: me.getBody(tooltipItems, data),\r\n\t\t\t\t\tafterBody: me.getAfterBody(tooltipItems, data),\r\n\t\t\t\t\tfooter: me.getFooter(tooltipItems, data),\r\n\t\t\t\t\tx: Math.round(tooltipPosition.x),\r\n\t\t\t\t\ty: Math.round(tooltipPosition.y),\r\n\t\t\t\t\tcaretPadding: helpers.getValueOrDefault(tooltipPosition.padding, 2),\r\n\t\t\t\t\tlabelColors: labelColors\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// We need to determine alignment of\r\n\t\t\t\tvar tooltipSize = me.getTooltipSize(model);\r\n\t\t\t\tme.determineAlignment(tooltipSize); // Smart Tooltip placement to stay on the canvas\r\n\r\n\t\t\t\thelpers.extend(model, me.getBackgroundPoint(model, tooltipSize));\r\n\t\t\t} else {\r\n\t\t\t\tme._model.opacity = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (changed && opts.custom) {\r\n\t\t\t\topts.custom.call(me, model);\r\n\t\t\t}\r\n\r\n\t\t\treturn me;\r\n\t\t},\r\n\t\tgetTooltipSize: function(vm) {\r\n\t\t\tvar ctx = this._chart.ctx;\r\n\r\n\t\t\tvar size = {\r\n\t\t\t\theight: vm.yPadding * 2, // Tooltip Padding\r\n\t\t\t\twidth: 0\r\n\t\t\t};\r\n\r\n\t\t\t// Count of all lines in the body\r\n\t\t\tvar body = vm.body;\r\n\t\t\tvar combinedBodyLength = body.reduce(function(count, bodyItem) {\r\n\t\t\t\treturn count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length;\r\n\t\t\t}, 0);\r\n\t\t\tcombinedBodyLength += vm.beforeBody.length + vm.afterBody.length;\r\n\r\n\t\t\tvar titleLineCount = vm.title.length;\r\n\t\t\tvar footerLineCount = vm.footer.length;\r\n\t\t\tvar titleFontSize = vm.titleFontSize,\r\n\t\t\t\tbodyFontSize = vm.bodyFontSize,\r\n\t\t\t\tfooterFontSize = vm.footerFontSize;\r\n\r\n\t\t\tsize.height += titleLineCount * titleFontSize; // Title Lines\r\n\t\t\tsize.height += (titleLineCount - 1) * vm.titleSpacing; // Title Line Spacing\r\n\t\t\tsize.height += titleLineCount ? vm.titleMarginBottom : 0; // Title's bottom Margin\r\n\t\t\tsize.height += combinedBodyLength * bodyFontSize; // Body Lines\r\n\t\t\tsize.height += combinedBodyLength ? (combinedBodyLength - 1) * vm.bodySpacing : 0; // Body Line Spacing\r\n\t\t\tsize.height += footerLineCount ? vm.footerMarginTop : 0; // Footer Margin\r\n\t\t\tsize.height += footerLineCount * (footerFontSize); // Footer Lines\r\n\t\t\tsize.height += footerLineCount ? (footerLineCount - 1) * vm.footerSpacing : 0; // Footer Line Spacing\r\n\r\n\t\t\t// Title width\r\n\t\t\tvar widthPadding = 0;\r\n\t\t\tvar maxLineWidth = function(line) {\r\n\t\t\t\tsize.width = Math.max(size.width, ctx.measureText(line).width + widthPadding);\r\n\t\t\t};\r\n\r\n\t\t\tctx.font = helpers.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);\r\n\t\t\thelpers.each(vm.title, maxLineWidth);\r\n\r\n\t\t\t// Body width\r\n\t\t\tctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);\r\n\t\t\thelpers.each(vm.beforeBody.concat(vm.afterBody), maxLineWidth);\r\n\r\n\t\t\t// Body lines may include some extra width due to the color box\r\n\t\t\twidthPadding = body.length > 1 ? (bodyFontSize + 2) : 0;\r\n\t\t\thelpers.each(body, function(bodyItem) {\r\n\t\t\t\thelpers.each(bodyItem.before, maxLineWidth);\r\n\t\t\t\thelpers.each(bodyItem.lines, maxLineWidth);\r\n\t\t\t\thelpers.each(bodyItem.after, maxLineWidth);\r\n\t\t\t});\r\n\r\n\t\t\t// Reset back to 0\r\n\t\t\twidthPadding = 0;\r\n\r\n\t\t\t// Footer width\r\n\t\t\tctx.font = helpers.fontString(footerFontSize, vm._footerFontStyle, vm._footerFontFamily);\r\n\t\t\thelpers.each(vm.footer, maxLineWidth);\r\n\r\n\t\t\t// Add padding\r\n\t\t\tsize.width += 2 * vm.xPadding;\r\n\r\n\t\t\treturn size;\r\n\t\t},\r\n\t\tdetermineAlignment: function(size) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar model = me._model;\r\n\t\t\tvar chart = me._chart;\r\n\t\t\tvar chartArea = me._chartInstance.chartArea;\r\n\r\n\t\t\tif (model.y < size.height) {\r\n\t\t\t\tmodel.yAlign = 'top';\r\n\t\t\t} else if (model.y > (chart.height - size.height)) {\r\n\t\t\t\tmodel.yAlign = 'bottom';\r\n\t\t\t}\r\n\r\n\t\t\tvar lf, rf; // functions to determine left, right alignment\r\n\t\t\tvar olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart\r\n\t\t\tvar yf; // function to get the y alignment if the tooltip goes outside of the left or right edges\r\n\t\t\tvar midX = (chartArea.left + chartArea.right) / 2;\r\n\t\t\tvar midY = (chartArea.top + chartArea.bottom) / 2;\r\n\r\n\t\t\tif (model.yAlign === 'center') {\r\n\t\t\t\tlf = function(x) {\r\n\t\t\t\t\treturn x <= midX;\r\n\t\t\t\t};\r\n\t\t\t\trf = function(x) {\r\n\t\t\t\t\treturn x > midX;\r\n\t\t\t\t};\r\n\t\t\t} else {\r\n\t\t\t\tlf = function(x) {\r\n\t\t\t\t\treturn x <= (size.width / 2);\r\n\t\t\t\t};\r\n\t\t\t\trf = function(x) {\r\n\t\t\t\t\treturn x >= (chart.width - (size.width / 2));\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tolf = function(x) {\r\n\t\t\t\treturn x + size.width > chart.width;\r\n\t\t\t};\r\n\t\t\torf = function(x) {\r\n\t\t\t\treturn x - size.width < 0;\r\n\t\t\t};\r\n\t\t\tyf = function(y) {\r\n\t\t\t\treturn y <= midY ? 'top' : 'bottom';\r\n\t\t\t};\r\n\r\n\t\t\tif (lf(model.x)) {\r\n\t\t\t\tmodel.xAlign = 'left';\r\n\r\n\t\t\t\t// Is tooltip too wide and goes over the right side of the chart.?\r\n\t\t\t\tif (olf(model.x)) {\r\n\t\t\t\t\tmodel.xAlign = 'center';\r\n\t\t\t\t\tmodel.yAlign = yf(model.y);\r\n\t\t\t\t}\r\n\t\t\t} else if (rf(model.x)) {\r\n\t\t\t\tmodel.xAlign = 'right';\r\n\r\n\t\t\t\t// Is tooltip too wide and goes outside left edge of canvas?\r\n\t\t\t\tif (orf(model.x)) {\r\n\t\t\t\t\tmodel.xAlign = 'center';\r\n\t\t\t\t\tmodel.yAlign = yf(model.y);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetBackgroundPoint: function(vm, size) {\r\n\t\t\t// Background Position\r\n\t\t\tvar pt = {\r\n\t\t\t\tx: vm.x,\r\n\t\t\t\ty: vm.y\r\n\t\t\t};\r\n\r\n\t\t\tvar caretSize = vm.caretSize,\r\n\t\t\t\tcaretPadding = vm.caretPadding,\r\n\t\t\t\tcornerRadius = vm.cornerRadius,\r\n\t\t\t\txAlign = vm.xAlign,\r\n\t\t\t\tyAlign = vm.yAlign,\r\n\t\t\t\tpaddingAndSize = caretSize + caretPadding,\r\n\t\t\t\tradiusAndPadding = cornerRadius + caretPadding;\r\n\r\n\t\t\tif (xAlign === 'right') {\r\n\t\t\t\tpt.x -= size.width;\r\n\t\t\t} else if (xAlign === 'center') {\r\n\t\t\t\tpt.x -= (size.width / 2);\r\n\t\t\t}\r\n\r\n\t\t\tif (yAlign === 'top') {\r\n\t\t\t\tpt.y += paddingAndSize;\r\n\t\t\t} else if (yAlign === 'bottom') {\r\n\t\t\t\tpt.y -= size.height + paddingAndSize;\r\n\t\t\t} else {\r\n\t\t\t\tpt.y -= (size.height / 2);\r\n\t\t\t}\r\n\r\n\t\t\tif (yAlign === 'center') {\r\n\t\t\t\tif (xAlign === 'left') {\r\n\t\t\t\t\tpt.x += paddingAndSize;\r\n\t\t\t\t} else if (xAlign === 'right') {\r\n\t\t\t\t\tpt.x -= paddingAndSize;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (xAlign === 'left') {\r\n\t\t\t\t\tpt.x -= radiusAndPadding;\r\n\t\t\t\t} else if (xAlign === 'right') {\r\n\t\t\t\t\tpt.x += radiusAndPadding;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn pt;\r\n\t\t},\r\n\t\tdrawCaret: function(tooltipPoint, size, opacity) {\r\n\t\t\tvar vm = this._view;\r\n\t\t\tvar ctx = this._chart.ctx;\r\n\t\t\tvar x1, x2, x3;\r\n\t\t\tvar y1, y2, y3;\r\n\t\t\tvar caretSize = vm.caretSize;\r\n\t\t\tvar cornerRadius = vm.cornerRadius;\r\n\t\t\tvar xAlign = vm.xAlign,\r\n\t\t\t\tyAlign = vm.yAlign;\r\n\t\t\tvar ptX = tooltipPoint.x,\r\n\t\t\t\tptY = tooltipPoint.y;\r\n\t\t\tvar width = size.width,\r\n\t\t\t\theight = size.height;\r\n\r\n\t\t\tif (yAlign === 'center') {\r\n\t\t\t\t// Left or right side\r\n\t\t\t\tif (xAlign === 'left') {\r\n\t\t\t\t\tx1 = ptX;\r\n\t\t\t\t\tx2 = x1 - caretSize;\r\n\t\t\t\t\tx3 = x1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx1 = ptX + width;\r\n\t\t\t\t\tx2 = x1 + caretSize;\r\n\t\t\t\t\tx3 = x1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ty2 = ptY + (height / 2);\r\n\t\t\t\ty1 = y2 - caretSize;\r\n\t\t\t\ty3 = y2 + caretSize;\r\n\t\t\t} else {\r\n\t\t\t\tif (xAlign === 'left') {\r\n\t\t\t\t\tx1 = ptX + cornerRadius;\r\n\t\t\t\t\tx2 = x1 + caretSize;\r\n\t\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t\t} else if (xAlign === 'right') {\r\n\t\t\t\t\tx1 = ptX + width - cornerRadius;\r\n\t\t\t\t\tx2 = x1 - caretSize;\r\n\t\t\t\t\tx3 = x2 - caretSize;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx2 = ptX + (width / 2);\r\n\t\t\t\t\tx1 = x2 - caretSize;\r\n\t\t\t\t\tx3 = x2 + caretSize;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (yAlign === 'top') {\r\n\t\t\t\t\ty1 = ptY;\r\n\t\t\t\t\ty2 = y1 - caretSize;\r\n\t\t\t\t\ty3 = y1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ty1 = ptY + height;\r\n\t\t\t\t\ty2 = y1 + caretSize;\r\n\t\t\t\t\ty3 = y1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar bgColor = helpers.color(vm.backgroundColor);\r\n\t\t\tctx.fillStyle = bgColor.alpha(opacity * bgColor.alpha()).rgbString();\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.moveTo(x1, y1);\r\n\t\t\tctx.lineTo(x2, y2);\r\n\t\t\tctx.lineTo(x3, y3);\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.fill();\r\n\t\t},\r\n\t\tdrawTitle: function(pt, vm, ctx, opacity) {\r\n\t\t\tvar title = vm.title;\r\n\r\n\t\t\tif (title.length) {\r\n\t\t\t\tctx.textAlign = vm._titleAlign;\r\n\t\t\t\tctx.textBaseline = \"top\";\r\n\r\n\t\t\t\tvar titleFontSize = vm.titleFontSize,\r\n\t\t\t\t\ttitleSpacing = vm.titleSpacing;\r\n\r\n\t\t\t\tvar titleFontColor = helpers.color(vm.titleFontColor);\r\n\t\t\t\tctx.fillStyle = titleFontColor.alpha(opacity * titleFontColor.alpha()).rgbString();\r\n\t\t\t\tctx.font = helpers.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);\r\n\r\n\t\t\t\tvar i, len;\r\n\t\t\t\tfor (i = 0, len = title.length; i < len; ++i) {\r\n\t\t\t\t\tctx.fillText(title[i], pt.x, pt.y);\r\n\t\t\t\t\tpt.y += titleFontSize + titleSpacing; // Line Height and spacing\r\n\r\n\t\t\t\t\tif (i + 1 === title.length) {\r\n\t\t\t\t\t\tpt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdrawBody: function(pt, vm, ctx, opacity) {\r\n\t\t\tvar bodyFontSize = vm.bodyFontSize;\r\n\t\t\tvar bodySpacing = vm.bodySpacing;\r\n\t\t\tvar body = vm.body;\r\n\r\n\t\t\tctx.textAlign = vm._bodyAlign;\r\n\t\t\tctx.textBaseline = \"top\";\r\n\r\n\t\t\tvar bodyFontColor = helpers.color(vm.bodyFontColor);\r\n\t\t\tvar textColor = bodyFontColor.alpha(opacity * bodyFontColor.alpha()).rgbString();\r\n\t\t\tctx.fillStyle = textColor;\r\n\t\t\tctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);\r\n\r\n\t\t\t// Before Body\r\n\t\t\tvar xLinePadding = 0;\r\n\t\t\tvar fillLineOfText = function(line) {\r\n\t\t\t\tctx.fillText(line, pt.x + xLinePadding, pt.y);\r\n\t\t\t\tpt.y += bodyFontSize + bodySpacing;\r\n\t\t\t};\r\n\r\n\t\t\t// Before body lines\r\n\t\t\thelpers.each(vm.beforeBody, fillLineOfText);\r\n\r\n\t\t\tvar drawColorBoxes = body.length > 1;\r\n\t\t\txLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0;\r\n\r\n\t\t\t// Draw body lines now\r\n\t\t\thelpers.each(body, function(bodyItem, i) {\r\n\t\t\t\thelpers.each(bodyItem.before, fillLineOfText);\r\n\r\n\t\t\t\thelpers.each(bodyItem.lines, function(line) {\r\n\t\t\t\t\t// Draw Legend-like boxes if needed\r\n\t\t\t\t\tif (drawColorBoxes) {\r\n\t\t\t\t\t\t// Fill a white rect so that colours merge nicely if the opacity is < 1\r\n\t\t\t\t\t\tctx.fillStyle = helpers.color(vm.legendColorBackground).alpha(opacity).rgbaString();\r\n\t\t\t\t\t\tctx.fillRect(pt.x, pt.y, bodyFontSize, bodyFontSize);\r\n\r\n\t\t\t\t\t\t// Border\r\n\t\t\t\t\t\tctx.strokeStyle = helpers.color(vm.labelColors[i].borderColor).alpha(opacity).rgbaString();\r\n\t\t\t\t\t\tctx.strokeRect(pt.x, pt.y, bodyFontSize, bodyFontSize);\r\n\r\n\t\t\t\t\t\t// Inner square\r\n\t\t\t\t\t\tctx.fillStyle = helpers.color(vm.labelColors[i].backgroundColor).alpha(opacity).rgbaString();\r\n\t\t\t\t\t\tctx.fillRect(pt.x + 1, pt.y + 1, bodyFontSize - 2, bodyFontSize - 2);\r\n\r\n\t\t\t\t\t\tctx.fillStyle = textColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfillLineOfText(line);\r\n\t\t\t\t});\r\n\r\n\t\t\t\thelpers.each(bodyItem.after, fillLineOfText);\r\n\t\t\t});\r\n\r\n\t\t\t// Reset back to 0 for after body\r\n\t\t\txLinePadding = 0;\r\n\r\n\t\t\t// After body lines\r\n\t\t\thelpers.each(vm.afterBody, fillLineOfText);\r\n\t\t\tpt.y -= bodySpacing; // Remove last body spacing\r\n\t\t},\r\n\t\tdrawFooter: function(pt, vm, ctx, opacity) {\r\n\t\t\tvar footer = vm.footer;\r\n\r\n\t\t\tif (footer.length) {\r\n\t\t\t\tpt.y += vm.footerMarginTop;\r\n\r\n\t\t\t\tctx.textAlign = vm._footerAlign;\r\n\t\t\t\tctx.textBaseline = \"top\";\r\n\r\n\t\t\t\tvar footerFontColor = helpers.color(vm.footerFontColor);\r\n\t\t\t\tctx.fillStyle = footerFontColor.alpha(opacity * footerFontColor.alpha()).rgbString();\r\n\t\t\t\tctx.font = helpers.fontString(vm.footerFontSize, vm._footerFontStyle, vm._footerFontFamily);\r\n\r\n\t\t\t\thelpers.each(footer, function(line) {\r\n\t\t\t\t\tctx.fillText(line, pt.x, pt.y);\r\n\t\t\t\t\tpt.y += vm.footerFontSize + vm.footerSpacing;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t\tdraw: function() {\r\n\t\t\tvar ctx = this._chart.ctx;\r\n\t\t\tvar vm = this._view;\r\n\r\n\t\t\tif (vm.opacity === 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar tooltipSize = this.getTooltipSize(vm);\r\n\t\t\tvar pt = {\r\n\t\t\t\tx: vm.x,\r\n\t\t\t\ty: vm.y\r\n\t\t\t};\r\n\r\n\t\t\t// IE11/Edge does not like very small opacities, so snap to 0\r\n\t\t\tvar opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity;\r\n\r\n\t\t\tif (this._options.enabled) {\r\n\t\t\t\t// Draw Background\r\n\t\t\t\tvar bgColor = helpers.color(vm.backgroundColor);\r\n\t\t\t\tctx.fillStyle = bgColor.alpha(opacity * bgColor.alpha()).rgbString();\r\n\t\t\t\thelpers.drawRoundedRectangle(ctx, pt.x, pt.y, tooltipSize.width, tooltipSize.height, vm.cornerRadius);\r\n\t\t\t\tctx.fill();\r\n\r\n\t\t\t\t// Draw Caret\r\n\t\t\t\tthis.drawCaret(pt, tooltipSize, opacity);\r\n\r\n\t\t\t\t// Draw Title, Body, and Footer\r\n\t\t\t\tpt.x += vm.xPadding;\r\n\t\t\t\tpt.y += vm.yPadding;\r\n\r\n\t\t\t\t// Titles\r\n\t\t\t\tthis.drawTitle(pt, vm, ctx, opacity);\r\n\r\n\t\t\t\t// Body\r\n\t\t\t\tthis.drawBody(pt, vm, ctx, opacity);\r\n\r\n\t\t\t\t// Footer\r\n\t\t\t\tthis.drawFooter(pt, vm, ctx, opacity);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],35:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n  var helpers = Chart.helpers,\r\n    globalOpts = Chart.defaults.global;\r\n\r\n  globalOpts.elements.arc = {\r\n    backgroundColor: globalOpts.defaultColor,\r\n    borderColor: \"#fff\",\r\n    borderWidth: 2\r\n  };\r\n\r\n  Chart.elements.Arc = Chart.Element.extend({\r\n    inLabelRange: function(mouseX) {\r\n      var vm = this._view;\r\n\r\n      if (vm) {\r\n        return (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));\r\n      } else {\r\n        return false;\r\n      }\r\n    },\r\n    inRange: function(chartX, chartY) {\r\n      var vm = this._view;\r\n\r\n      if (vm) {\r\n        var pointRelativePosition = helpers.getAngleFromPoint(vm, {\r\n            x: chartX,\r\n            y: chartY\r\n          }),\r\n          angle = pointRelativePosition.angle,\r\n          distance = pointRelativePosition.distance;\r\n\r\n        //Sanitise angle range\r\n        var startAngle = vm.startAngle;\r\n        var endAngle = vm.endAngle;\r\n        while (endAngle < startAngle) {\r\n          endAngle += 2.0 * Math.PI;\r\n        }\r\n        while (angle > endAngle) {\r\n          angle -= 2.0 * Math.PI;\r\n        }\r\n        while (angle < startAngle) {\r\n          angle += 2.0 * Math.PI;\r\n        }\r\n\r\n        //Check if within the range of the open/close angle\r\n        var betweenAngles = (angle >= startAngle && angle <= endAngle),\r\n          withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);\r\n\r\n        return (betweenAngles && withinRadius);\r\n      } else {\r\n        return false;\r\n      }\r\n    },\r\n    tooltipPosition: function() {\r\n      var vm = this._view;\r\n\r\n      var centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2),\r\n        rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\r\n      return {\r\n        x: vm.x + (Math.cos(centreAngle) * rangeFromCentre),\r\n        y: vm.y + (Math.sin(centreAngle) * rangeFromCentre)\r\n      };\r\n    },\r\n    draw: function() {\r\n\r\n      var ctx = this._chart.ctx,\r\n        vm = this._view,\r\n        sA = vm.startAngle,\r\n        eA = vm.endAngle;\r\n\r\n      ctx.beginPath();\r\n\r\n      ctx.arc(vm.x, vm.y, vm.outerRadius, sA, eA);\r\n      ctx.arc(vm.x, vm.y, vm.innerRadius, eA, sA, true);\r\n\r\n      ctx.closePath();\r\n      ctx.strokeStyle = vm.borderColor;\r\n      ctx.lineWidth = vm.borderWidth;\r\n\r\n      ctx.fillStyle = vm.backgroundColor;\r\n\r\n      ctx.fill();\r\n      ctx.lineJoin = 'bevel';\r\n\r\n      if (vm.borderWidth) {\r\n        ctx.stroke();\r\n      }\r\n    }\r\n  });\r\n};\r\n\r\n},{}],36:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\tvar globalDefaults = Chart.defaults.global;\r\n\r\n\tChart.defaults.global.elements.line = {\r\n\t\ttension: 0.4,\r\n\t\tbackgroundColor: globalDefaults.defaultColor,\r\n\t\tborderWidth: 3,\r\n\t\tborderColor: globalDefaults.defaultColor,\r\n\t\tborderCapStyle: 'butt',\r\n\t\tborderDash: [],\r\n\t\tborderDashOffset: 0.0,\r\n\t\tborderJoinStyle: 'miter',\r\n\t\tcapBezierPoints: true,\r\n\t\tfill: true // do we fill in the area between the line and its base axis\r\n\t};\r\n\r\n\tChart.elements.Line = Chart.Element.extend({\r\n\t\tdraw: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar vm = me._view;\r\n\t\t\tvar spanGaps = vm.spanGaps;\r\n\t\t\tvar scaleZero = vm.scaleZero;\r\n\t\t\tvar loop = me._loop;\r\n\r\n\t\t\tvar ctx = me._chart.ctx;\r\n\t\t\tctx.save();\r\n\r\n\t\t\t// Helper function to draw a line to a point\r\n\t\t\tfunction lineToPoint(previousPoint, point) {\r\n\t\t\t\tvar vm = point._view;\r\n\t\t\t\tif (point._view.steppedLine === true) {\r\n\t\t\t\t\tctx.lineTo(point._view.x, previousPoint._view.y);\r\n\t\t\t\t\tctx.lineTo(point._view.x, point._view.y);\t\t\t\t\r\n\t\t\t\t} else if (point._view.tension === 0) {\r\n\t\t\t\t\tctx.lineTo(vm.x, vm.y);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tctx.bezierCurveTo(\r\n\t\t\t\t\t\tpreviousPoint._view.controlPointNextX,\r\n\t\t\t\t\t\tpreviousPoint._view.controlPointNextY,\r\n\t\t\t\t\t\tvm.controlPointPreviousX,\r\n\t\t\t\t\t\tvm.controlPointPreviousY,\r\n\t\t\t\t\t\tvm.x,\r\n\t\t\t\t\t\tvm.y\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar points = me._children.slice(); // clone array\r\n\t\t\tvar lastDrawnIndex = -1;\r\n\r\n\t\t\t// If we are looping, adding the first point again\r\n\t\t\tif (loop && points.length) {\r\n\t\t\t\tpoints.push(points[0]);\r\n\t\t\t}\r\n\r\n\t\t\tvar index, current, previous, currentVM;\r\n\r\n\t\t\t// Fill Line\r\n\t\t\tif (points.length && vm.fill) {\r\n\t\t\t\tctx.beginPath();\r\n\r\n\t\t\t\tfor (index = 0; index < points.length; ++index) {\r\n\t\t\t\t\tcurrent = points[index];\r\n\t\t\t\t\tprevious = helpers.previousItem(points, index);\r\n\t\t\t\t\tcurrentVM = current._view;\r\n\r\n\t\t\t\t\t// First point moves to it's starting position no matter what\r\n\t\t\t\t\tif (index === 0) {\r\n\t\t\t\t\t\tif (loop) {\r\n\t\t\t\t\t\t\tctx.moveTo(scaleZero.x, scaleZero.y);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tctx.moveTo(currentVM.x, scaleZero);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (!currentVM.skip) {\r\n\t\t\t\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t\t\t\t\tctx.lineTo(currentVM.x, currentVM.y);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tprevious = lastDrawnIndex === -1 ? previous : points[lastDrawnIndex];\r\n\r\n\t\t\t\t\t\tif (currentVM.skip) {\r\n\t\t\t\t\t\t\t// Only do this if this is the first point that is skipped\r\n\t\t\t\t\t\t\tif (!spanGaps && lastDrawnIndex === (index - 1)) {\r\n\t\t\t\t\t\t\t\tif (loop) {\r\n\t\t\t\t\t\t\t\t\tctx.lineTo(scaleZero.x, scaleZero.y);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tctx.lineTo(previous._view.x, scaleZero);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (lastDrawnIndex !== (index - 1)) {\r\n\t\t\t\t\t\t\t\t// There was a gap and this is the first point after the gap. If we've never drawn a point, this is a special case. \r\n\t\t\t\t\t\t\t\t// If the first data point is NaN, then there is no real gap to skip\r\n\t\t\t\t\t\t\t\tif (spanGaps && lastDrawnIndex !== -1) {\r\n\t\t\t\t\t\t\t\t\t// We are spanning the gap, so simple draw a line to this point\r\n\t\t\t\t\t\t\t\t\tlineToPoint(previous, current);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (loop) {\r\n\t\t\t\t\t\t\t\t\t\tctx.lineTo(currentVM.x, currentVM.y);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tctx.lineTo(currentVM.x, scaleZero);\r\n\t\t\t\t\t\t\t\t\t\tctx.lineTo(currentVM.x, currentVM.y);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Line to next point\r\n\t\t\t\t\t\t\t\tlineToPoint(previous, current);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!loop && lastDrawnIndex !== -1) {\r\n\t\t\t\t\tctx.lineTo(points[lastDrawnIndex]._view.x, scaleZero);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tctx.fillStyle = vm.backgroundColor || globalDefaults.defaultColor;\r\n\t\t\t\tctx.closePath();\r\n\t\t\t\tctx.fill();\r\n\t\t\t}\r\n\r\n\t\t\t// Stroke Line Options\r\n\t\t\tvar globalOptionLineElements = globalDefaults.elements.line;\r\n\t\t\tctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;\r\n\r\n\t\t\t// IE 9 and 10 do not support line dash\r\n\t\t\tif (ctx.setLineDash) {\r\n\t\t\t\tctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\r\n\t\t\t}\r\n\r\n\t\t\tctx.lineDashOffset = vm.borderDashOffset || globalOptionLineElements.borderDashOffset;\r\n\t\t\tctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\r\n\t\t\tctx.lineWidth = vm.borderWidth || globalOptionLineElements.borderWidth;\r\n\t\t\tctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;\r\n\r\n\t\t\t// Stroke Line\r\n\t\t\tctx.beginPath();\r\n\t\t\tlastDrawnIndex = -1;\r\n\r\n\t\t\tfor (index = 0; index < points.length; ++index) {\r\n\t\t\t\tcurrent = points[index];\r\n\t\t\t\tprevious = helpers.previousItem(points, index);\r\n\t\t\t\tcurrentVM = current._view;\r\n\r\n\t\t\t\t// First point moves to it's starting position no matter what\r\n\t\t\t\tif (index === 0) {\r\n\t\t\t\t\tif (!currentVM.skip) {\r\n\t\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprevious = lastDrawnIndex === -1 ? previous : points[lastDrawnIndex];\r\n\r\n\t\t\t\t\tif (!currentVM.skip) {\r\n\t\t\t\t\t\tif ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {\r\n\t\t\t\t\t\t\t// There was a gap and this is the first point after the gap\r\n\t\t\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Line to next point\r\n\t\t\t\t\t\t\tlineToPoint(previous, current);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tctx.stroke();\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t});\r\n};\r\n},{}],37:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers,\r\n\t\tglobalOpts = Chart.defaults.global,\r\n\t\tdefaultColor = globalOpts.defaultColor;\r\n\r\n\tglobalOpts.elements.point = {\r\n\t\tradius: 3,\r\n\t\tpointStyle: 'circle',\r\n\t\tbackgroundColor: defaultColor,\r\n\t\tborderWidth: 1,\r\n\t\tborderColor: defaultColor,\r\n\t\t// Hover\r\n\t\thitRadius: 1,\r\n\t\thoverRadius: 4,\r\n\t\thoverBorderWidth: 1\r\n\t};\r\n\r\n\tChart.elements.Point = Chart.Element.extend({\r\n\t\tinRange: function(mouseX, mouseY) {\r\n\t\t\tvar vm = this._view;\r\n\t\t\treturn vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;\r\n\t\t},\r\n\t\tinLabelRange: function(mouseX) {\r\n\t\t\tvar vm = this._view;\r\n\t\t\treturn vm ? (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hitRadius, 2)) : false;\r\n\t\t},\r\n\t\ttooltipPosition: function() {\r\n\t\t\tvar vm = this._view;\r\n\t\t\treturn {\r\n\t\t\t\tx: vm.x,\r\n\t\t\t\ty: vm.y,\r\n\t\t\t\tpadding: vm.radius + vm.borderWidth\r\n\t\t\t};\r\n\t\t},\r\n\t\tdraw: function() {\r\n\t\t\tvar vm = this._view;\r\n\t\t\tvar ctx = this._chart.ctx;\r\n\t\t\tvar pointStyle = vm.pointStyle;\r\n\t\t\tvar radius = vm.radius;\r\n\t\t\tvar x = vm.x;\r\n\t\t\tvar y = vm.y;\r\n\r\n\t\t\tif (vm.skip) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tctx.strokeStyle = vm.borderColor || defaultColor;\r\n\t\t\tctx.lineWidth = helpers.getValueOrDefault(vm.borderWidth, globalOpts.elements.point.borderWidth);\r\n\t\t\tctx.fillStyle = vm.backgroundColor || defaultColor;\r\n\r\n\t\t\tChart.canvasHelpers.drawPoint(ctx, pointStyle, radius, x, y);\r\n\t\t}\r\n\t});\r\n};\r\n\r\n},{}],38:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar globalOpts = Chart.defaults.global;\r\n\r\n\tglobalOpts.elements.rectangle = {\r\n\t\tbackgroundColor: globalOpts.defaultColor,\r\n\t\tborderWidth: 0,\r\n\t\tborderColor: globalOpts.defaultColor,\r\n\t\tborderSkipped: 'bottom'\r\n\t};\r\n\r\n\tChart.elements.Rectangle = Chart.Element.extend({\r\n\t\tdraw: function() {\r\n\t\t\tvar ctx = this._chart.ctx;\r\n\t\t\tvar vm = this._view;\r\n\r\n\t\t\tvar halfWidth = vm.width / 2,\r\n\t\t\t\tleftX = vm.x - halfWidth,\r\n\t\t\t\trightX = vm.x + halfWidth,\r\n\t\t\t\ttop = vm.base - (vm.base - vm.y),\r\n\t\t\t\thalfStroke = vm.borderWidth / 2;\r\n\r\n\t\t\t// Canvas doesn't allow us to stroke inside the width so we can\r\n\t\t\t// adjust the sizes to fit if we're setting a stroke on the line\r\n\t\t\tif (vm.borderWidth) {\r\n\t\t\t\tleftX += halfStroke;\r\n\t\t\t\trightX -= halfStroke;\r\n\t\t\t\ttop += halfStroke;\r\n\t\t\t}\r\n\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\t\tctx.strokeStyle = vm.borderColor;\r\n\t\t\tctx.lineWidth = vm.borderWidth;\r\n\r\n\t\t\t// Corner points, from bottom-left to bottom-right clockwise\r\n\t\t\t// | 1 2 |\r\n\t\t\t// | 0 3 |\r\n\t\t\tvar corners = [\r\n\t\t\t\t[leftX, vm.base],\r\n\t\t\t\t[leftX, top],\r\n\t\t\t\t[rightX, top],\r\n\t\t\t\t[rightX, vm.base]\r\n\t\t\t];\r\n\r\n\t\t\t// Find first (starting) corner with fallback to 'bottom'\r\n\t\t\tvar borders = ['bottom', 'left', 'top', 'right'];\r\n\t\t\tvar startCorner = borders.indexOf(vm.borderSkipped, 0);\r\n\t\t\tif (startCorner === -1)\r\n\t\t\t\tstartCorner = 0;\r\n\r\n\t\t\tfunction cornerAt(index) {\r\n\t\t\t\treturn corners[(startCorner + index) % 4];\r\n\t\t\t}\r\n\r\n\t\t\t// Draw rectangle from 'startCorner'\r\n\t\t\tctx.moveTo.apply(ctx, cornerAt(0));\r\n\t\t\tfor (var i = 1; i < 4; i++)\r\n\t\t\t\tctx.lineTo.apply(ctx, cornerAt(i));\r\n\r\n\t\t\tctx.fill();\r\n\t\t\tif (vm.borderWidth) {\r\n\t\t\t\tctx.stroke();\r\n\t\t\t}\r\n\t\t},\r\n\t\theight: function() {\r\n\t\t\tvar vm = this._view;\r\n\t\t\treturn vm.base - vm.y;\r\n\t\t},\r\n\t\tinRange: function(mouseX, mouseY) {\r\n\t\t\tvar vm = this._view;\r\n\t\t\treturn vm ?\r\n\t\t\t\t\t(vm.y < vm.base ?\r\n\t\t\t\t\t\t(mouseX >= vm.x - vm.width / 2 && mouseX <= vm.x + vm.width / 2) && (mouseY >= vm.y && mouseY <= vm.base) :\r\n\t\t\t\t\t\t(mouseX >= vm.x - vm.width / 2 && mouseX <= vm.x + vm.width / 2) && (mouseY >= vm.base && mouseY <= vm.y)) :\r\n\t\t\t\t\tfalse;\r\n\t\t},\r\n\t\tinLabelRange: function(mouseX) {\r\n\t\t\tvar vm = this._view;\r\n\t\t\treturn vm ? (mouseX >= vm.x - vm.width / 2 && mouseX <= vm.x + vm.width / 2) : false;\r\n\t\t},\r\n\t\ttooltipPosition: function() {\r\n\t\t\tvar vm = this._view;\r\n\t\t\treturn {\r\n\t\t\t\tx: vm.x,\r\n\t\t\t\ty: vm.y\r\n\t\t\t};\r\n\t\t}\r\n\t});\r\n\r\n};\r\n},{}],39:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\t// Default config for a category scale\r\n\tvar defaultConfig = {\r\n\t\tposition: \"bottom\"\r\n\t};\r\n\r\n\tvar DatasetScale = Chart.Scale.extend({\r\n\t\t/**\r\n\t\t* Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use tose\r\n\t\t* else fall back to data.labels\r\n\t\t* @private\r\n\t\t*/\r\n\t\tgetLabels: function() {\r\n\t\t\tvar data = this.chart.data;\r\n\t\t\treturn (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels;\r\n\t\t},\r\n\t\t// Implement this so that\r\n\t\tdetermineDataLimits: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar labels = me.getLabels();\r\n\t\t\tme.minIndex = 0;\r\n\t\t\tme.maxIndex = labels.length - 1;\r\n\t\t\tvar findIndex;\r\n\r\n\t\t\tif (me.options.ticks.min !== undefined) {\r\n\t\t\t\t// user specified min value\r\n\t\t\t\tfindIndex = helpers.indexOf(labels, me.options.ticks.min);\r\n\t\t\t\tme.minIndex = findIndex !== -1 ? findIndex : me.minIndex;\r\n\t\t\t}\r\n\r\n\t\t\tif (me.options.ticks.max !== undefined) {\r\n\t\t\t\t// user specified max value\r\n\t\t\t\tfindIndex = helpers.indexOf(labels, me.options.ticks.max);\r\n\t\t\t\tme.maxIndex = findIndex !== -1 ? findIndex : me.maxIndex;\r\n\t\t\t}\r\n\r\n\t\t\tme.min = labels[me.minIndex];\r\n\t\t\tme.max = labels[me.maxIndex];\r\n\t\t},\r\n\r\n\t\tbuildTicks: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar labels = me.getLabels();\r\n\t\t\t// If we are viewing some subset of labels, slice the original array\r\n\t\t\tme.ticks = (me.minIndex === 0 && me.maxIndex === labels.length - 1) ? labels : labels.slice(me.minIndex, me.maxIndex + 1);\r\n\t\t},\r\n\r\n\t\tgetLabelForIndex: function(index) {\r\n\t\t\treturn this.ticks[index];\r\n\t\t},\r\n\r\n\t\t// Used to get data value locations.  Value can either be an index or a numerical value\r\n\t\tgetPixelForValue: function(value, index, datasetIndex, includeOffset) {\r\n\t\t\tvar me = this;\r\n\t\t\t// 1 is added because we need the length but we have the indexes\r\n\t\t\tvar offsetAmt = Math.max((me.maxIndex + 1 - me.minIndex - ((me.options.gridLines.offsetGridLines) ? 0 : 1)), 1);\r\n\r\n\t\t\tif (value !== undefined && isNaN(index)) {\r\n\t\t\t\tvar labels = me.getLabels();\r\n\t\t\t\tvar idx = labels.indexOf(value);\r\n\t\t\t\tindex = idx !== -1 ? idx : index;\r\n\t\t\t}\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\r\n\t\t\t\tvar valueWidth = innerWidth / offsetAmt;\r\n\t\t\t\tvar widthOffset = (valueWidth * (index - me.minIndex)) + me.paddingLeft;\r\n\r\n\t\t\tif (me.options.gridLines.offsetGridLines && includeOffset || me.maxIndex === me.minIndex && includeOffset) {\r\n\t\t\t\t\twidthOffset += (valueWidth / 2);\r\n\t\t\t}\r\n\r\n\t\t\t\treturn me.left + Math.round(widthOffset);\r\n\t\t\t} else {\r\n\t\t\t\tvar innerHeight = me.height - (me.paddingTop + me.paddingBottom);\r\n\t\t\t\tvar valueHeight = innerHeight / offsetAmt;\r\n\t\t\t\tvar heightOffset = (valueHeight * (index - me.minIndex)) + me.paddingTop;\r\n\r\n\t\t\t\tif (me.options.gridLines.offsetGridLines && includeOffset) {\r\n\t\t\t\t\theightOffset += (valueHeight / 2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn me.top + Math.round(heightOffset);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetPixelForTick: function(index, includeOffset) {\r\n\t\t\treturn this.getPixelForValue(this.ticks[index], index + this.minIndex, null, includeOffset);\r\n\t\t},\r\n\t\tgetValueForPixel: function(pixel) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar value;\r\n\t\t\tvar offsetAmt = Math.max((me.ticks.length - ((me.options.gridLines.offsetGridLines) ? 0 : 1)), 1);\r\n\t\t\tvar horz = me.isHorizontal();\r\n\t\t\tvar innerDimension = horz ? me.width - (me.paddingLeft + me.paddingRight) : me.height - (me.paddingTop + me.paddingBottom);\r\n\t\t\tvar valueDimension = innerDimension / offsetAmt;\r\n\r\n\t\t\tpixel -= horz ? me.left : me.top;\r\n\r\n\t\t\tif (me.options.gridLines.offsetGridLines) {\r\n\t\t\t\tpixel -= (valueDimension / 2);\r\n\t\t\t}\r\n\t\t\tpixel -= horz ? me.paddingLeft : me.paddingTop;\r\n\r\n\t\t\tif (pixel <= 0) {\r\n\t\t\t\tvalue = 0;\r\n\t\t\t} else {\r\n\t\t\t\tvalue = Math.round(pixel / valueDimension);\r\n\t\t\t}\r\n\r\n\t\t\treturn value;\r\n\t\t},\r\n\t\tgetBasePixel: function() {\r\n\t\t\treturn this.bottom;\r\n\t\t}\r\n\t});\r\n\r\n\tChart.scaleService.registerScaleType(\"category\", DatasetScale, defaultConfig);\r\n\r\n};\r\n},{}],40:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tvar defaultConfig = {\r\n\t\tposition: \"left\",\r\n\t\tticks: {\r\n\t\t\tcallback: function(tickValue, index, ticks) {\r\n\t\t\t\t// If we have lots of ticks, don't use the ones\r\n\t\t\t\tvar delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];\r\n\r\n\t\t\t\t// If we have a number like 2.5 as the delta, figure out how many decimal places we need\r\n\t\t\t\tif (Math.abs(delta) > 1) {\r\n\t\t\t\t\tif (tickValue !== Math.floor(tickValue)) {\r\n\t\t\t\t\t\t// not an integer\r\n\t\t\t\t\t\tdelta = tickValue - Math.floor(tickValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar logDelta = helpers.log10(Math.abs(delta));\r\n\t\t\t\tvar tickString = '';\r\n\r\n\t\t\t\tif (tickValue !== 0) {\r\n\t\t\t\t\tvar numDecimal = -1 * Math.floor(logDelta);\r\n\t\t\t\t\tnumDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places\r\n\t\t\t\t\ttickString = tickValue.toFixed(numDecimal);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttickString = '0'; // never show decimal places for 0\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn tickString;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tvar LinearScale = Chart.LinearScaleBase.extend({\r\n\t\tdetermineDataLimits: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar chart = me.chart;\r\n\t\t\tvar data = chart.data;\r\n\t\t\tvar datasets = data.datasets;\r\n\t\t\tvar isHorizontal = me.isHorizontal();\r\n\r\n\t\t\tfunction IDMatches(meta) {\r\n\t\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\r\n\t\t\t}\r\n\r\n\t\t\t// First Calculate the range\r\n\t\t\tme.min = null;\r\n\t\t\tme.max = null;\r\n\r\n\t\t\tif (opts.stacked) {\r\n\t\t\t\tvar valuesPerType = {};\r\n\t\t\t\tvar hasPositiveValues = false;\r\n\t\t\t\tvar hasNegativeValues = false;\r\n\r\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\r\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\t\tif (valuesPerType[meta.type] === undefined) {\r\n\t\t\t\t\t\tvaluesPerType[meta.type] = {\r\n\t\t\t\t\t\t\tpositiveValues: [],\r\n\t\t\t\t\t\t\tnegativeValues: []\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Store these per type\r\n\t\t\t\t\tvar positiveValues = valuesPerType[meta.type].positiveValues;\r\n\t\t\t\t\tvar negativeValues = valuesPerType[meta.type].negativeValues;\r\n\r\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\r\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\r\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tpositiveValues[index] = positiveValues[index] || 0;\r\n\t\t\t\t\t\t\tnegativeValues[index] = negativeValues[index] || 0;\r\n\r\n\t\t\t\t\t\t\tif (opts.relativePoints) {\r\n\t\t\t\t\t\t\t\tpositiveValues[index] = 100;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tif (value < 0) {\r\n\t\t\t\t\t\t\t\t\thasNegativeValues = true;\r\n\t\t\t\t\t\t\t\t\tnegativeValues[index] += value;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\thasPositiveValues = true;\r\n\t\t\t\t\t\t\t\t\tpositiveValues[index] += value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\thelpers.each(valuesPerType, function(valuesForType) {\r\n\t\t\t\t\tvar values = valuesForType.positiveValues.concat(valuesForType.negativeValues);\r\n\t\t\t\t\tvar minVal = helpers.min(values);\r\n\t\t\t\t\tvar maxVal = helpers.max(values);\r\n\t\t\t\t\tme.min = me.min === null ? minVal : Math.min(me.min, minVal);\r\n\t\t\t\t\tme.max = me.max === null ? maxVal : Math.max(me.max, maxVal);\r\n\t\t\t\t});\r\n\r\n\t\t\t} else {\r\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\r\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\r\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\r\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (me.min === null) {\r\n\t\t\t\t\t\t\t\tme.min = value;\r\n\t\t\t\t\t\t\t} else if (value < me.min) {\r\n\t\t\t\t\t\t\t\tme.min = value;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (me.max === null) {\r\n\t\t\t\t\t\t\t\tme.max = value;\r\n\t\t\t\t\t\t\t} else if (value > me.max) {\r\n\t\t\t\t\t\t\t\tme.max = value;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\r\n\t\t\tthis.handleTickRangeOptions();\r\n\t\t},\r\n\t\tgetTickLimit: function() {\r\n\t\t\tvar maxTicks;\r\n\t\t\tvar me = this;\r\n\t\t\tvar tickOpts = me.options.ticks;\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tmaxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.width / 50));\r\n\t\t\t} else {\r\n\t\t\t\t// The factor of 2 used to scale the font size has been experimentally determined.\r\n\t\t\t\tvar tickFontSize = helpers.getValueOrDefault(tickOpts.fontSize, Chart.defaults.global.defaultFontSize);\r\n\t\t\t\tmaxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.height / (2 * tickFontSize)));\r\n\t\t\t}\r\n\r\n\t\t\treturn maxTicks;\r\n\t\t},\r\n\t\t// Called after the ticks are built. We need\r\n\t\thandleDirectionalChanges: function() {\r\n\t\t\tif (!this.isHorizontal()) {\r\n\t\t\t\t// We are in a vertical orientation. The top value is the highest. So reverse the array\r\n\t\t\t\tthis.ticks.reverse();\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t\t},\r\n\t\t// Utils\r\n\t\tgetPixelForValue: function(value) {\r\n\t\t\t// This must be called after fit has been run so that\r\n\t\t\t// this.left, this.top, this.right, and this.bottom have been defined\r\n\t\t\tvar me = this;\r\n\t\t\tvar paddingLeft = me.paddingLeft;\r\n\t\t\tvar paddingBottom = me.paddingBottom;\r\n\t\t\tvar start = me.start;\r\n\r\n\t\t\tvar rightValue = +me.getRightValue(value);\r\n\t\t\tvar pixel;\r\n\t\t\tvar innerDimension;\r\n\t\t\tvar range = me.end - start;\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tinnerDimension = me.width - (paddingLeft + me.paddingRight);\r\n\t\t\t\tpixel = me.left + (innerDimension / range * (rightValue - start));\r\n\t\t\t\treturn Math.round(pixel + paddingLeft);\r\n\t\t\t} else {\r\n\t\t\t\tinnerDimension = me.height - (me.paddingTop + paddingBottom);\r\n\t\t\t\tpixel = (me.bottom - paddingBottom) - (innerDimension / range * (rightValue - start));\r\n\t\t\t\treturn Math.round(pixel);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetValueForPixel: function(pixel) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar isHorizontal = me.isHorizontal();\r\n\t\t\tvar paddingLeft = me.paddingLeft;\r\n\t\t\tvar paddingBottom = me.paddingBottom;\r\n\t\t\tvar innerDimension = isHorizontal ? me.width - (paddingLeft + me.paddingRight) : me.height - (me.paddingTop + paddingBottom);\r\n\t\t\tvar offset = (isHorizontal ? pixel - me.left - paddingLeft : me.bottom - paddingBottom - pixel) / innerDimension;\r\n\t\t\treturn me.start + ((me.end - me.start) * offset);\r\n\t\t},\r\n\t\tgetPixelForTick: function(index) {\r\n\t\t\treturn this.getPixelForValue(this.ticksAsNumbers[index]);\r\n\t\t}\r\n\t});\r\n\tChart.scaleService.registerScaleType(\"linear\", LinearScale, defaultConfig);\r\n\r\n};\r\n},{}],41:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers,\r\n\t\tnoop = helpers.noop;\r\n\r\n\tChart.LinearScaleBase = Chart.Scale.extend({\r\n\t\thandleTickRangeOptions: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\t\t// If we are forcing it to begin at 0, but 0 will already be rendered on the chart,\r\n\t\t\t// do nothing since that would make the chart weird. If the user really wants a weird chart\r\n\t\t\t// axis, they can manually override it\r\n\t\t\tif (tickOpts.beginAtZero) {\r\n\t\t\t\tvar minSign = helpers.sign(me.min);\r\n\t\t\t\tvar maxSign = helpers.sign(me.max);\r\n\r\n\t\t\t\tif (minSign < 0 && maxSign < 0) {\r\n\t\t\t\t\t// move the top up to 0\r\n\t\t\t\t\tme.max = 0;\r\n\t\t\t\t} else if (minSign > 0 && maxSign > 0) {\r\n\t\t\t\t\t// move the botttom down to 0\r\n\t\t\t\t\tme.min = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (tickOpts.min !== undefined) {\r\n\t\t\t\tme.min = tickOpts.min;\r\n\t\t\t} else if (tickOpts.suggestedMin !== undefined) {\r\n\t\t\t\tme.min = Math.min(me.min, tickOpts.suggestedMin);\r\n\t\t\t}\r\n\r\n\t\t\tif (tickOpts.max !== undefined) {\r\n\t\t\t\tme.max = tickOpts.max;\r\n\t\t\t} else if (tickOpts.suggestedMax !== undefined) {\r\n\t\t\t\tme.max = Math.max(me.max, tickOpts.suggestedMax);\r\n\t\t\t}\r\n\r\n\t\t\tif (me.min === me.max) {\r\n\t\t\t\tme.max++;\r\n\r\n\t\t\t\tif (!tickOpts.beginAtZero) {\r\n\t\t\t\t\tme.min--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetTickLimit: noop,\r\n\t\thandleDirectionalChanges: noop,\r\n\r\n\t\tbuildTicks: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar ticks = me.ticks = [];\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\r\n\r\n\t\t\t// Figure out what the max number of ticks we can support it is based on the size of\r\n\t\t\t// the axis area. For now, we say that the minimum tick spacing in pixels must be 50\r\n\t\t\t// We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\r\n\t\t\t// the graph\r\n\r\n\t\t\tvar maxTicks = me.getTickLimit();\r\n\r\n\t\t\t// Make sure we always have at least 2 ticks\r\n\t\t\tmaxTicks = Math.max(2, maxTicks);\r\n\r\n\t\t\t// To get a \"nice\" value for the tick spacing, we will use the appropriately named\r\n\t\t\t// \"nice number\" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks\r\n\t\t\t// for details.\r\n\r\n\t\t\tvar spacing;\r\n\t\t\tvar fixedStepSizeSet = (tickOpts.fixedStepSize && tickOpts.fixedStepSize > 0) || (tickOpts.stepSize && tickOpts.stepSize > 0);\r\n\t\t\tif (fixedStepSizeSet) {\r\n\t\t\t\tspacing = getValueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize);\r\n\t\t\t} else {\r\n\t\t\t\tvar niceRange = helpers.niceNum(me.max - me.min, false);\r\n\t\t\t\tspacing = helpers.niceNum(niceRange / (maxTicks - 1), true);\r\n\t\t\t}\r\n\t\t\tvar niceMin = Math.floor(me.min / spacing) * spacing;\r\n\t\t\tvar niceMax = Math.ceil(me.max / spacing) * spacing;\r\n\t\t\tvar numSpaces = (niceMax - niceMin) / spacing;\r\n\r\n\t\t\t// If very close to our rounded value, use it.\r\n\t\t\tif (helpers.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\r\n\t\t\t\tnumSpaces = Math.round(numSpaces);\r\n\t\t\t} else {\r\n\t\t\t\tnumSpaces = Math.ceil(numSpaces);\r\n\t\t\t}\r\n\r\n\t\t\t// Put the values into the ticks array\r\n\t\t\tticks.push(tickOpts.min !== undefined ? tickOpts.min : niceMin);\r\n\t\t\tfor (var j = 1; j < numSpaces; ++j) {\r\n\t\t\t\tticks.push(niceMin + (j * spacing));\r\n\t\t\t}\r\n\t\t\tticks.push(tickOpts.max !== undefined ? tickOpts.max : niceMax);\r\n\r\n\t\t\tme.handleDirectionalChanges();\r\n\r\n\t\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\r\n\t\t\t// range of the scale\r\n\t\t\tme.max = helpers.max(ticks);\r\n\t\t\tme.min = helpers.min(ticks);\r\n\r\n\t\t\tif (tickOpts.reverse) {\r\n\t\t\t\tticks.reverse();\r\n\r\n\t\t\t\tme.start = me.max;\r\n\t\t\t\tme.end = me.min;\r\n\t\t\t} else {\r\n\t\t\t\tme.start = me.min;\r\n\t\t\t\tme.end = me.max;\r\n\t\t\t}\r\n\t\t},\r\n\t\tconvertTicksToLabels: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tme.ticksAsNumbers = me.ticks.slice();\r\n\t\t\tme.zeroLineIndex = me.ticks.indexOf(0);\r\n\r\n\t\t\tChart.Scale.prototype.convertTicksToLabels.call(me);\r\n\t\t}\r\n\t});\r\n};\r\n},{}],42:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\r\n\tvar defaultConfig = {\r\n\t\tposition: \"left\",\r\n\r\n\t\t// label settings\r\n\t\tticks: {\r\n\t\t\tcallback: function(value, index, arr) {\r\n\t\t\t\tvar remain = value / (Math.pow(10, Math.floor(helpers.log10(value))));\r\n\r\n\t\t\t\tif (value === 0){\r\n\t\t\t\t\treturn '0';\r\n\t\t\t\t} else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === arr.length - 1) {\r\n\t\t\t\t\treturn value.toExponential();\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn '';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tvar LogarithmicScale = Chart.Scale.extend({\r\n\t\tdetermineDataLimits: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\t\t\tvar chart = me.chart;\r\n\t\t\tvar data = chart.data;\r\n\t\t\tvar datasets = data.datasets;\r\n\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\r\n\t\t\tvar isHorizontal = me.isHorizontal();\r\n\t\t\tfunction IDMatches(meta) {\r\n\t\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\r\n\t\t\t}\r\n\r\n\t\t\t// Calculate Range\r\n\t\t\tme.min = null;\r\n\t\t\tme.max = null;\r\n\t\t\tme.minNotZero = null;\r\n\r\n\t\t\tif (opts.stacked) {\r\n\t\t\t\tvar valuesPerType = {};\r\n\r\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\r\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\t\tif (valuesPerType[meta.type] === undefined) {\r\n\t\t\t\t\t\t\tvaluesPerType[meta.type] = [];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\r\n\t\t\t\t\t\t\tvar values = valuesPerType[meta.type];\r\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\r\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tvalues[index] = values[index] || 0;\r\n\r\n\t\t\t\t\t\t\tif (opts.relativePoints) {\r\n\t\t\t\t\t\t\t\tvalues[index] = 100;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Don't need to split positive and negative since the log scale can't handle a 0 crossing\r\n\t\t\t\t\t\t\t\tvalues[index] += value;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\thelpers.each(valuesPerType, function(valuesForType) {\r\n\t\t\t\t\tvar minVal = helpers.min(valuesForType);\r\n\t\t\t\t\tvar maxVal = helpers.max(valuesForType);\r\n\t\t\t\t\tme.min = me.min === null ? minVal : Math.min(me.min, minVal);\r\n\t\t\t\t\tme.max = me.max === null ? maxVal : Math.max(me.max, maxVal);\r\n\t\t\t\t});\r\n\r\n\t\t\t} else {\r\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\r\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\r\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\r\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\r\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\r\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (me.min === null) {\r\n\t\t\t\t\t\t\t\tme.min = value;\r\n\t\t\t\t\t\t\t} else if (value < me.min) {\r\n\t\t\t\t\t\t\t\tme.min = value;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (me.max === null) {\r\n\t\t\t\t\t\t\t\tme.max = value;\r\n\t\t\t\t\t\t\t} else if (value > me.max) {\r\n\t\t\t\t\t\t\t\tme.max = value;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif(value !== 0 && (me.minNotZero === null || value < me.minNotZero)) {\r\n\t\t\t\t\t\t\t\tme.minNotZero = value;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tme.min = getValueOrDefault(tickOpts.min, me.min);\r\n\t\t\tme.max = getValueOrDefault(tickOpts.max, me.max);\r\n\r\n\t\t\tif (me.min === me.max) {\r\n\t\t\t\tif (me.min !== 0 && me.min !== null) {\r\n\t\t\t\t\tme.min = Math.pow(10, Math.floor(helpers.log10(me.min)) - 1);\r\n\t\t\t\t\tme.max = Math.pow(10, Math.floor(helpers.log10(me.max)) + 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tme.min = 1;\r\n\t\t\t\t\tme.max = 10;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tbuildTicks: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\r\n\r\n\t\t\t// Reset the ticks array. Later on, we will draw a grid line at these positions\r\n\t\t\t// The array simply contains the numerical value of the spots where ticks will be\r\n\t\t\tvar ticks = me.ticks = [];\r\n\r\n\t\t\t// Figure out what the max number of ticks we can support it is based on the size of\r\n\t\t\t// the axis area. For now, we say that the minimum tick spacing in pixels must be 50\r\n\t\t\t// We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\r\n\t\t\t// the graph\r\n\r\n\t\t\tvar tickVal = getValueOrDefault(tickOpts.min, Math.pow(10, Math.floor(helpers.log10(me.min))));\r\n\r\n\t\t\twhile (tickVal < me.max) {\r\n\t\t\t\tticks.push(tickVal);\r\n\r\n\t\t\t\tvar exp;\r\n\t\t\t\tvar significand;\r\n\r\n\t\t\t\tif(tickVal === 0){\r\n\t\t\t\t\texp = Math.floor(helpers.log10(me.minNotZero));\r\n\t\t\t\t\tsignificand = Math.round(me.minNotZero / Math.pow(10, exp));\r\n\t\t\t\t} else {\r\n\t\t\t\t\texp = Math.floor(helpers.log10(tickVal));\r\n\t\t\t\t\tsignificand = Math.floor(tickVal / Math.pow(10, exp)) + 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (significand === 10) {\r\n\t\t\t\t\tsignificand = 1;\r\n\t\t\t\t\t++exp;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttickVal = significand * Math.pow(10, exp);\r\n\t\t\t}\r\n\r\n\t\t\tvar lastTick = getValueOrDefault(tickOpts.max, tickVal);\r\n\t\t\tticks.push(lastTick);\r\n\r\n\t\t\tif (!me.isHorizontal()) {\r\n\t\t\t\t// We are in a vertical orientation. The top value is the highest. So reverse the array\r\n\t\t\t\tticks.reverse();\r\n\t\t\t}\r\n\r\n\t\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\r\n\t\t\t// range of the scale\r\n\t\t\tme.max = helpers.max(ticks);\r\n\t\t\tme.min = helpers.min(ticks);\r\n\r\n\t\t\tif (tickOpts.reverse) {\r\n\t\t\t\tticks.reverse();\r\n\r\n\t\t\t\tme.start = me.max;\r\n\t\t\t\tme.end = me.min;\r\n\t\t\t} else {\r\n\t\t\t\tme.start = me.min;\r\n\t\t\t\tme.end = me.max;\r\n\t\t\t}\r\n\t\t},\r\n\t\tconvertTicksToLabels: function() {\r\n\t\t\tthis.tickValues = this.ticks.slice();\r\n\r\n\t\t\tChart.Scale.prototype.convertTicksToLabels.call(this);\r\n\t\t},\r\n\t\t// Get the correct tooltip label\r\n\t\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t\t},\r\n\t\tgetPixelForTick: function(index) {\r\n\t\t\treturn this.getPixelForValue(this.tickValues[index]);\r\n\t\t},\r\n\t\tgetPixelForValue: function(value) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar innerDimension;\r\n\t\t\tvar pixel;\r\n\r\n\t\t\tvar start = me.start;\r\n\t\t\tvar newVal = +me.getRightValue(value);\r\n\t\t\tvar range;\r\n\t\t\tvar paddingTop = me.paddingTop;\r\n\t\t\tvar paddingBottom = me.paddingBottom;\r\n\t\t\tvar paddingLeft = me.paddingLeft;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\trange = helpers.log10(me.end) - helpers.log10(start); // todo: if start === 0\r\n\t\t\t\tif (newVal === 0) {\r\n\t\t\t\t\tpixel = me.left + paddingLeft;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinnerDimension = me.width - (paddingLeft + me.paddingRight);\r\n\t\t\t\t\tpixel = me.left + (innerDimension / range * (helpers.log10(newVal) - helpers.log10(start)));\r\n\t\t\t\t\tpixel += paddingLeft;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Bottom - top since pixels increase downard on a screen\r\n\t\t\t\tinnerDimension = me.height - (paddingTop + paddingBottom);\r\n\t\t\t\tif(start === 0 && !tickOpts.reverse){\r\n\t\t\t\t\trange = helpers.log10(me.end) - helpers.log10(me.minNotZero);\r\n\t\t\t\t\tif (newVal === start) {\r\n\t\t\t\t\t\tpixel = me.bottom - paddingBottom;\r\n\t\t\t\t\t} else if(newVal === me.minNotZero){\r\n\t\t\t\t\t\tpixel = me.bottom - paddingBottom - innerDimension * 0.02;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpixel = me.bottom - paddingBottom - innerDimension * 0.02 - (innerDimension * 0.98/ range * (helpers.log10(newVal)-helpers.log10(me.minNotZero)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (me.end === 0 && tickOpts.reverse){\r\n\t\t\t\t\trange = helpers.log10(me.start) - helpers.log10(me.minNotZero);\r\n\t\t\t\t\tif (newVal === me.end) {\r\n\t\t\t\t\t\tpixel = me.top + paddingTop;\r\n\t\t\t\t\t} else if(newVal === me.minNotZero){\r\n\t\t\t\t\t\tpixel = me.top + paddingTop + innerDimension * 0.02;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpixel = me.top + paddingTop + innerDimension * 0.02 + (innerDimension * 0.98/ range * (helpers.log10(newVal)-helpers.log10(me.minNotZero)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\trange = helpers.log10(me.end) - helpers.log10(start);\r\n\t\t\t\t\tinnerDimension = me.height - (paddingTop + paddingBottom);\r\n\t\t\t\t\tpixel = (me.bottom - paddingBottom) - (innerDimension / range * (helpers.log10(newVal) - helpers.log10(start)));\r\n\t\t\t   }\r\n\t\t\t}\r\n\t\t\treturn pixel;\r\n\t\t},\r\n\t\tgetValueForPixel: function(pixel) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar range = helpers.log10(me.end) - helpers.log10(me.start);\r\n\t\t\tvar value, innerDimension;\r\n\r\n\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\tinnerDimension = me.width - (me.paddingLeft + me.paddingRight);\r\n\t\t\t\tvalue = me.start * Math.pow(10, (pixel - me.left - me.paddingLeft) * range / innerDimension);\r\n\t\t\t} else {  // todo: if start === 0\r\n\t\t\t\tinnerDimension = me.height - (me.paddingTop + me.paddingBottom);\r\n\t\t\t\tvalue = Math.pow(10, (me.bottom - me.paddingBottom - pixel) * range / innerDimension) / me.start;\r\n\t\t\t}\r\n\t\t\treturn value;\r\n\t\t}\r\n\t});\r\n\tChart.scaleService.registerScaleType(\"logarithmic\", LogarithmicScale, defaultConfig);\r\n\r\n};\r\n},{}],43:[function(require,module,exports){\r\n\"use strict\";\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\tvar globalDefaults = Chart.defaults.global;\r\n\r\n\tvar defaultConfig = {\r\n\t\tdisplay: true,\r\n\r\n\t\t//Boolean - Whether to animate scaling the chart from the centre\r\n\t\tanimate: true,\r\n\t\tlineArc: false,\r\n\t\tposition: \"chartArea\",\r\n\r\n\t\tangleLines: {\r\n\t\t\tdisplay: true,\r\n\t\t\tcolor: \"rgba(0, 0, 0, 0.1)\",\r\n\t\t\tlineWidth: 1\r\n\t\t},\r\n\r\n\t\t// label settings\r\n\t\tticks: {\r\n\t\t\t//Boolean - Show a backdrop to the scale label\r\n\t\t\tshowLabelBackdrop: true,\r\n\r\n\t\t\t//String - The colour of the label backdrop\r\n\t\t\tbackdropColor: \"rgba(255,255,255,0.75)\",\r\n\r\n\t\t\t//Number - The backdrop padding above & below the label in pixels\r\n\t\t\tbackdropPaddingY: 2,\r\n\r\n\t\t\t//Number - The backdrop padding to the side of the label in pixels\r\n\t\t\tbackdropPaddingX: 2\r\n\t\t},\r\n\r\n\t\tpointLabels: {\r\n\t\t\t//Number - Point label font size in pixels\r\n\t\t\tfontSize: 10,\r\n\r\n\t\t\t//Function - Used to convert point labels\r\n\t\t\tcallback: function(label) {\r\n\t\t\t\treturn label;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tvar LinearRadialScale = Chart.LinearScaleBase.extend({\r\n\t\tgetValueCount: function() {\r\n\t\t\treturn this.chart.data.labels.length;\r\n\t\t},\r\n\t\tsetDimensions: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\t\t\t// Set the unconstrained dimension before label rotation\r\n\t\t\tme.width = me.maxWidth;\r\n\t\t\tme.height = me.maxHeight;\r\n\t\t\tme.xCenter = Math.round(me.width / 2);\r\n\t\t\tme.yCenter = Math.round(me.height / 2);\r\n\r\n\t\t\tvar minSize = helpers.min([me.height, me.width]);\r\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\tme.drawingArea = opts.display ? (minSize / 2) - (tickFontSize / 2 + tickOpts.backdropPaddingY) : (minSize / 2);\r\n\t\t},\r\n\t\tdetermineDataLimits: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar chart = me.chart;\r\n\t\t\tme.min = null;\r\n\t\t\tme.max = null;\r\n\r\n\r\n\t\t\thelpers.each(chart.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex)) {\r\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\r\n\r\n\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\r\n\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\r\n\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (me.min === null) {\r\n\t\t\t\t\t\t\tme.min = value;\r\n\t\t\t\t\t\t} else if (value < me.min) {\r\n\t\t\t\t\t\t\tme.min = value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (me.max === null) {\r\n\t\t\t\t\t\t\tme.max = value;\r\n\t\t\t\t\t\t} else if (value > me.max) {\r\n\t\t\t\t\t\t\tme.max = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\r\n\t\t\tme.handleTickRangeOptions();\r\n\t\t},\r\n\t\tgetTickLimit: function() {\r\n\t\t\tvar tickOpts = this.options.ticks;\r\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\treturn Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(this.drawingArea / (1.5 * tickFontSize)));\r\n\t\t},\r\n\t\tconvertTicksToLabels: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tChart.LinearScaleBase.prototype.convertTicksToLabels.call(me);\r\n\r\n\t\t\t// Point labels\r\n\t\t\tme.pointLabels = me.chart.data.labels.map(me.options.pointLabels.callback, me);\r\n\t\t},\r\n\t\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\r\n\t\t},\r\n\t\tfit: function() {\r\n\t\t\t/*\r\n\t\t\t * Right, this is really confusing and there is a lot of maths going on here\r\n\t\t\t * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9\r\n\t\t\t *\r\n\t\t\t * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif\r\n\t\t\t *\r\n\t\t\t * Solution:\r\n\t\t\t *\r\n\t\t\t * We assume the radius of the polygon is half the size of the canvas at first\r\n\t\t\t * at each index we check if the text overlaps.\r\n\t\t\t *\r\n\t\t\t * Where it does, we store that angle and that index.\r\n\t\t\t *\r\n\t\t\t * After finding the largest index and angle we calculate how much we need to remove\r\n\t\t\t * from the shape radius to move the point inwards by that x.\r\n\t\t\t *\r\n\t\t\t * We average the left and right distances to get the maximum shape radius that can fit in the box\r\n\t\t\t * along with labels.\r\n\t\t\t *\r\n\t\t\t * Once we have that, we can find the centre point for the chart, by taking the x text protrusion\r\n\t\t\t * on each side, removing that from the size, halving it and adding the left x protrusion width.\r\n\t\t\t *\r\n\t\t\t * This will mean we have a shape fitted to the canvas, as large as it can be with the labels\r\n\t\t\t * and position it in the most space efficient manner\r\n\t\t\t *\r\n\t\t\t * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif\r\n\t\t\t */\r\n\r\n\t\t\tvar pointLabels = this.options.pointLabels;\r\n\t\t\tvar pointLabelFontSize = helpers.getValueOrDefault(pointLabels.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\tvar pointLabeFontStyle = helpers.getValueOrDefault(pointLabels.fontStyle, globalDefaults.defaultFontStyle);\r\n\t\t\tvar pointLabeFontFamily = helpers.getValueOrDefault(pointLabels.fontFamily, globalDefaults.defaultFontFamily);\r\n\t\t\tvar pointLabeFont = helpers.fontString(pointLabelFontSize, pointLabeFontStyle, pointLabeFontFamily);\r\n\r\n\t\t\t// Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.\r\n\t\t\t// Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points\r\n\t\t\tvar largestPossibleRadius = helpers.min([(this.height / 2 - pointLabelFontSize - 5), this.width / 2]),\r\n\t\t\t\tpointPosition,\r\n\t\t\t\ti,\r\n\t\t\t\ttextWidth,\r\n\t\t\t\thalfTextWidth,\r\n\t\t\t\tfurthestRight = this.width,\r\n\t\t\t\tfurthestRightIndex,\r\n\t\t\t\tfurthestRightAngle,\r\n\t\t\t\tfurthestLeft = 0,\r\n\t\t\t\tfurthestLeftIndex,\r\n\t\t\t\tfurthestLeftAngle,\r\n\t\t\t\txProtrusionLeft,\r\n\t\t\t\txProtrusionRight,\r\n\t\t\t\tradiusReductionRight,\r\n\t\t\t\tradiusReductionLeft;\r\n\t\t\tthis.ctx.font = pointLabeFont;\r\n\r\n\t\t\tfor (i = 0; i < this.getValueCount(); i++) {\r\n\t\t\t\t// 5px to space the text slightly out - similar to what we do in the draw function.\r\n\t\t\t\tpointPosition = this.getPointPosition(i, largestPossibleRadius);\r\n\t\t\t\ttextWidth = this.ctx.measureText(this.pointLabels[i] ? this.pointLabels[i] : '').width + 5;\r\n\r\n\t\t\t\t// Add quarter circle to make degree 0 mean top of circle\r\n\t\t\t\tvar angleRadians = this.getIndexAngle(i) + (Math.PI / 2);\r\n\t\t\t\tvar angle = (angleRadians * 360 / (2 * Math.PI)) % 360;\r\n\r\n\t\t\t\tif (angle === 0 || angle === 180) {\r\n\t\t\t\t\t// At angle 0 and 180, we're at exactly the top/bottom\r\n\t\t\t\t\t// of the radar chart, so text will be aligned centrally, so we'll half it and compare\r\n\t\t\t\t\t// w/left and right text sizes\r\n\t\t\t\t\thalfTextWidth = textWidth / 2;\r\n\t\t\t\t\tif (pointPosition.x + halfTextWidth > furthestRight) {\r\n\t\t\t\t\t\tfurthestRight = pointPosition.x + halfTextWidth;\r\n\t\t\t\t\t\tfurthestRightIndex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (pointPosition.x - halfTextWidth < furthestLeft) {\r\n\t\t\t\t\t\tfurthestLeft = pointPosition.x - halfTextWidth;\r\n\t\t\t\t\t\tfurthestLeftIndex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (angle < 180) {\r\n\t\t\t\t\t// Less than half the values means we'll left align the text\r\n\t\t\t\t\tif (pointPosition.x + textWidth > furthestRight) {\r\n\t\t\t\t\t\tfurthestRight = pointPosition.x + textWidth;\r\n\t\t\t\t\t\tfurthestRightIndex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// More than half the values means we'll right align the text\r\n\t\t\t\t\tif (pointPosition.x - textWidth < furthestLeft) {\r\n\t\t\t\t\t\tfurthestLeft = pointPosition.x - textWidth;\r\n\t\t\t\t\t\tfurthestLeftIndex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\txProtrusionLeft = furthestLeft;\r\n\t\t\txProtrusionRight = Math.ceil(furthestRight - this.width);\r\n\r\n\t\t\tfurthestRightAngle = this.getIndexAngle(furthestRightIndex);\r\n\t\t\tfurthestLeftAngle = this.getIndexAngle(furthestLeftIndex);\r\n\r\n\t\t\tradiusReductionRight = xProtrusionRight / Math.sin(furthestRightAngle + Math.PI / 2);\r\n\t\t\tradiusReductionLeft = xProtrusionLeft / Math.sin(furthestLeftAngle + Math.PI / 2);\r\n\r\n\t\t\t// Ensure we actually need to reduce the size of the chart\r\n\t\t\tradiusReductionRight = (helpers.isNumber(radiusReductionRight)) ? radiusReductionRight : 0;\r\n\t\t\tradiusReductionLeft = (helpers.isNumber(radiusReductionLeft)) ? radiusReductionLeft : 0;\r\n\r\n\t\t\tthis.drawingArea = Math.round(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2);\r\n\t\t\tthis.setCenterPoint(radiusReductionLeft, radiusReductionRight);\r\n\t\t},\r\n\t\tsetCenterPoint: function(leftMovement, rightMovement) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar maxRight = me.width - rightMovement - me.drawingArea,\r\n\t\t\t\tmaxLeft = leftMovement + me.drawingArea;\r\n\r\n\t\t\tme.xCenter = Math.round(((maxLeft + maxRight) / 2) + me.left);\r\n\t\t\t// Always vertically in the centre as the text height doesn't change\r\n\t\t\tme.yCenter = Math.round((me.height / 2) + me.top);\r\n\t\t},\r\n\r\n\t\tgetIndexAngle: function(index) {\r\n\t\t\tvar angleMultiplier = (Math.PI * 2) / this.getValueCount();\r\n\t\t\tvar startAngle = this.chart.options && this.chart.options.startAngle ?\r\n\t\t\t\tthis.chart.options.startAngle :\r\n\t\t\t\t0;\r\n\r\n\t\t\tvar startAngleRadians = startAngle * Math.PI * 2 / 360;\r\n\r\n\t\t\t// Start from the top instead of right, so remove a quarter of the circle\r\n\t\t\treturn index * angleMultiplier - (Math.PI / 2) + startAngleRadians;\r\n\t\t},\r\n\t\tgetDistanceFromCenterForValue: function(value) {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\tif (value === null) {\r\n\t\t\t\treturn 0; // null always in center\r\n\t\t\t}\r\n\r\n\t\t\t// Take into account half font size + the yPadding of the top value\r\n\t\t\tvar scalingFactor = me.drawingArea / (me.max - me.min);\r\n\t\t\tif (me.options.reverse) {\r\n\t\t\t\treturn (me.max - value) * scalingFactor;\r\n\t\t\t} else {\r\n\t\t\t\treturn (value - me.min) * scalingFactor;\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetPointPosition: function(index, distanceFromCenter) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar thisAngle = me.getIndexAngle(index);\r\n\t\t\treturn {\r\n\t\t\t\tx: Math.round(Math.cos(thisAngle) * distanceFromCenter) + me.xCenter,\r\n\t\t\t\ty: Math.round(Math.sin(thisAngle) * distanceFromCenter) + me.yCenter\r\n\t\t\t};\r\n\t\t},\r\n\t\tgetPointPositionForValue: function(index, value) {\r\n\t\t\treturn this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\r\n\t\t},\r\n\r\n\t\tgetBasePosition: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar min = me.min;\r\n\t\t\tvar max = me.max;\r\n\r\n\t\t\treturn me.getPointPositionForValue(0,\r\n\t\t\t\tme.beginAtZero? 0:\r\n\t\t\t\tmin < 0 && max < 0? max :\r\n\t\t\t\tmin > 0 && max > 0? min :\r\n\t\t\t\t0);\r\n\t\t},\r\n\r\n\t\tdraw: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tvar opts = me.options;\r\n\t\t\tvar gridLineOpts = opts.gridLines;\r\n\t\t\tvar tickOpts = opts.ticks;\r\n\t\t\tvar angleLineOpts = opts.angleLines;\r\n\t\t\tvar pointLabelOpts = opts.pointLabels;\r\n\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\r\n\r\n\t\t\tif (opts.display) {\r\n\t\t\t\tvar ctx = me.ctx;\r\n\r\n\t\t\t\t// Tick Font\r\n\t\t\t\tvar tickFontSize = getValueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\t\tvar tickFontStyle = getValueOrDefault(tickOpts.fontStyle, globalDefaults.defaultFontStyle);\r\n\t\t\t\tvar tickFontFamily = getValueOrDefault(tickOpts.fontFamily, globalDefaults.defaultFontFamily);\r\n\t\t\t\tvar tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);\r\n\r\n\t\t\t\thelpers.each(me.ticks, function(label, index) {\r\n\t\t\t\t\t// Don't draw a centre value (if it is minimum)\r\n\t\t\t\t\tif (index > 0 || opts.reverse) {\r\n\t\t\t\t\t\tvar yCenterOffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);\r\n\t\t\t\t\t\tvar yHeight = me.yCenter - yCenterOffset;\r\n\r\n\t\t\t\t\t\t// Draw circular lines around the scale\r\n\t\t\t\t\t\tif (gridLineOpts.display && index !== 0) {\r\n\t\t\t\t\t\t\tctx.strokeStyle = helpers.getValueAtIndexOrDefault(gridLineOpts.color, index - 1);\r\n\t\t\t\t\t\t\tctx.lineWidth = helpers.getValueAtIndexOrDefault(gridLineOpts.lineWidth, index - 1);\r\n\r\n\t\t\t\t\t\t\tif (opts.lineArc) {\r\n\t\t\t\t\t\t\t\t// Draw circular arcs between the points\r\n\t\t\t\t\t\t\t\tctx.beginPath();\r\n\t\t\t\t\t\t\t\tctx.arc(me.xCenter, me.yCenter, yCenterOffset, 0, Math.PI * 2);\r\n\t\t\t\t\t\t\t\tctx.closePath();\r\n\t\t\t\t\t\t\t\tctx.stroke();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Draw straight lines connecting each index\r\n\t\t\t\t\t\t\t\tctx.beginPath();\r\n\t\t\t\t\t\t\t\tfor (var i = 0; i < me.getValueCount(); i++) {\r\n\t\t\t\t\t\t\t\t\tvar pointPosition = me.getPointPosition(i, yCenterOffset);\r\n\t\t\t\t\t\t\t\t\tif (i === 0) {\r\n\t\t\t\t\t\t\t\t\t\tctx.moveTo(pointPosition.x, pointPosition.y);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tctx.lineTo(pointPosition.x, pointPosition.y);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tctx.closePath();\r\n\t\t\t\t\t\t\t\tctx.stroke();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (tickOpts.display) {\r\n\t\t\t\t\t\t\tvar tickFontColor = getValueOrDefault(tickOpts.fontColor, globalDefaults.defaultFontColor);\r\n\t\t\t\t\t\t\tctx.font = tickLabelFont;\r\n\r\n\t\t\t\t\t\t\tif (tickOpts.showLabelBackdrop) {\r\n\t\t\t\t\t\t\t\tvar labelWidth = ctx.measureText(label).width;\r\n\t\t\t\t\t\t\t\tctx.fillStyle = tickOpts.backdropColor;\r\n\t\t\t\t\t\t\t\tctx.fillRect(\r\n\t\t\t\t\t\t\t\t\tme.xCenter - labelWidth / 2 - tickOpts.backdropPaddingX,\r\n\t\t\t\t\t\t\t\t\tyHeight - tickFontSize / 2 - tickOpts.backdropPaddingY,\r\n\t\t\t\t\t\t\t\t\tlabelWidth + tickOpts.backdropPaddingX * 2,\r\n\t\t\t\t\t\t\t\t\ttickFontSize + tickOpts.backdropPaddingY * 2\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tctx.textAlign = 'center';\r\n\t\t\t\t\t\t\tctx.textBaseline = \"middle\";\r\n\t\t\t\t\t\t\tctx.fillStyle = tickFontColor;\r\n\t\t\t\t\t\t\tctx.fillText(label, me.xCenter, yHeight);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (!opts.lineArc) {\r\n\t\t\t\t\tctx.lineWidth = angleLineOpts.lineWidth;\r\n\t\t\t\t\tctx.strokeStyle = angleLineOpts.color;\r\n\r\n\t\t\t\t\tvar outerDistance = me.getDistanceFromCenterForValue(opts.reverse ? me.min : me.max);\r\n\r\n\t\t\t\t\t// Point Label Font\r\n\t\t\t\t\tvar pointLabelFontSize = getValueOrDefault(pointLabelOpts.fontSize, globalDefaults.defaultFontSize);\r\n\t\t\t\t\tvar pointLabeFontStyle = getValueOrDefault(pointLabelOpts.fontStyle, globalDefaults.defaultFontStyle);\r\n\t\t\t\t\tvar pointLabeFontFamily = getValueOrDefault(pointLabelOpts.fontFamily, globalDefaults.defaultFontFamily);\r\n\t\t\t\t\tvar pointLabeFont = helpers.fontString(pointLabelFontSize, pointLabeFontStyle, pointLabeFontFamily);\r\n\r\n\t\t\t\t\tfor (var i = me.getValueCount() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tif (angleLineOpts.display) {\r\n\t\t\t\t\t\t\tvar outerPosition = me.getPointPosition(i, outerDistance);\r\n\t\t\t\t\t\t\tctx.beginPath();\r\n\t\t\t\t\t\t\tctx.moveTo(me.xCenter, me.yCenter);\r\n\t\t\t\t\t\t\tctx.lineTo(outerPosition.x, outerPosition.y);\r\n\t\t\t\t\t\t\tctx.stroke();\r\n\t\t\t\t\t\t\tctx.closePath();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Extra 3px out for some label spacing\r\n\t\t\t\t\t\tvar pointLabelPosition = me.getPointPosition(i, outerDistance + 5);\r\n\r\n\t\t\t\t\t\t// Keep this in loop since we may support array properties here\r\n\t\t\t\t\t\tvar pointLabelFontColor = getValueOrDefault(pointLabelOpts.fontColor, globalDefaults.defaultFontColor);\r\n\t\t\t\t\t\tctx.font = pointLabeFont;\r\n\t\t\t\t\t\tctx.fillStyle = pointLabelFontColor;\r\n\r\n\t\t\t\t\t\tvar pointLabels = me.pointLabels;\r\n\r\n\t\t\t\t\t\t// Add quarter circle to make degree 0 mean top of circle\r\n\t\t\t\t\t\tvar angleRadians = this.getIndexAngle(i) + (Math.PI / 2);\r\n\t\t\t\t\t\tvar angle = (angleRadians * 360 / (2 * Math.PI)) % 360;\r\n\r\n\t\t\t\t\t\tif (angle === 0 || angle === 180) {\r\n\t\t\t\t\t\t\tctx.textAlign = 'center';\r\n\t\t\t\t\t\t} else if (angle < 180) {\r\n\t\t\t\t\t\t\tctx.textAlign = 'left';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tctx.textAlign = 'right';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Set the correct text baseline based on outer positioning\r\n\t\t\t\t\t\tif (angle === 90 || angle === 270) {\r\n\t\t\t\t\t\t\tctx.textBaseline = 'middle';\r\n\t\t\t\t\t\t} else if (angle > 270 || angle < 90) {\r\n\t\t\t\t\t\t\tctx.textBaseline = 'bottom';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tctx.textBaseline = 'top';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tctx.fillText(pointLabels[i] ? pointLabels[i] : '', pointLabelPosition.x, pointLabelPosition.y);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tChart.scaleService.registerScaleType(\"radialLinear\", LinearRadialScale, defaultConfig);\r\n\r\n};\r\n\r\n},{}],44:[function(require,module,exports){\r\n/*global window: false */\r\n\"use strict\";\r\n\r\nvar moment = require(6);\r\nmoment = typeof(moment) === 'function' ? moment : window.moment;\r\n\r\nmodule.exports = function(Chart) {\r\n\r\n\tvar helpers = Chart.helpers;\r\n\tvar time = {\r\n\t\tunits: [{\r\n\t\t\tname: 'millisecond',\r\n\t\t\tsteps: [1, 2, 5, 10, 20, 50, 100, 250, 500]\r\n\t\t}, {\r\n\t\t\tname: 'second',\r\n\t\t\tsteps: [1, 2, 5, 10, 30]\r\n\t\t}, {\r\n\t\t\tname: 'minute',\r\n\t\t\tsteps: [1, 2, 5, 10, 30]\r\n\t\t}, {\r\n\t\t\tname: 'hour',\r\n\t\t\tsteps: [1, 2, 3, 6, 12]\r\n\t\t}, {\r\n\t\t\tname: 'day',\r\n\t\t\tsteps: [1, 2, 5]\r\n\t\t}, {\r\n\t\t\tname: 'week',\r\n\t\t\tmaxStep: 4\r\n\t\t}, {\r\n\t\t\tname: 'month',\r\n\t\t\tmaxStep: 3\r\n\t\t}, {\r\n\t\t\tname: 'quarter',\r\n\t\t\tmaxStep: 4\r\n\t\t}, {\r\n\t\t\tname: 'year',\r\n\t\t\tmaxStep: false\r\n\t\t}]\r\n\t};\r\n\r\n\tvar defaultConfig = {\r\n\t\tposition: \"bottom\",\r\n\r\n\t\ttime: {\r\n\t\t\tparser: false, // false == a pattern string from http://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment\r\n\t\t\tformat: false, // DEPRECATED false == date objects, moment object, callback or a pattern string from http://momentjs.com/docs/#/parsing/string-format/\r\n\t\t\tunit: false, // false == automatic or override with week, month, year, etc.\r\n\t\t\tround: false, // none, or override with week, month, year, etc.\r\n\t\t\tdisplayFormat: false, // DEPRECATED\r\n\t\t\tisoWeekday: false, // override week start day - see http://momentjs.com/docs/#/get-set/iso-weekday/\r\n\r\n\t\t\t// defaults to unit's corresponding unitFormat below or override using pattern string from http://momentjs.com/docs/#/displaying/format/\r\n\t\t\tdisplayFormats: {\r\n\t\t\t\t'millisecond': 'h:mm:ss.SSS a', // 11:20:01.123 AM,\r\n\t\t\t\t'second': 'h:mm:ss a', // 11:20:01 AM\r\n\t\t\t\t'minute': 'h:mm:ss a', // 11:20:01 AM\r\n\t\t\t\t'hour': 'MMM D, hA', // Sept 4, 5PM\r\n\t\t\t\t'day': 'll', // Sep 4 2015\r\n\t\t\t\t'week': 'll', // Week 46, or maybe \"[W]WW - YYYY\" ?\r\n\t\t\t\t'month': 'MMM YYYY', // Sept 2015\r\n\t\t\t\t'quarter': '[Q]Q - YYYY', // Q3\r\n\t\t\t\t'year': 'YYYY' // 2015\r\n\t\t\t}\r\n\t\t},\r\n\t\tticks: {\r\n\t\t\tautoSkip: false\r\n\t\t}\r\n\t};\r\n\r\n\tvar TimeScale = Chart.Scale.extend({\r\n\t\tinitialize: function() {\r\n\t\t\tif (!moment) {\r\n\t\t\t\tthrow new Error('Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com');\r\n\t\t\t}\r\n\r\n\t\t\tChart.Scale.prototype.initialize.call(this);\r\n\t\t},\r\n\t\tgetLabelMoment: function(datasetIndex, index) {\r\n\t\t\tif (typeof this.labelMoments[datasetIndex] != 'undefined') {\r\n\t\t\t\treturn this.labelMoments[datasetIndex][index];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetMomentStartOf: function(tick) {\r\n\t\t\tvar me = this;\r\n\t\t\tif (me.options.time.unit === 'week' && me.options.time.isoWeekday !== false) {\r\n\t\t\t\treturn tick.clone().startOf('isoWeek').isoWeekday(me.options.time.isoWeekday);\r\n\t\t\t} else {\r\n\t\t\t\treturn tick.clone().startOf(me.tickUnit);\r\n\t\t\t}\r\n\t\t},\r\n\t\tdetermineDataLimits: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tme.labelMoments = [];\r\n\r\n\t\t\t// Only parse these once. If the dataset does not have data as x,y pairs, we will use\r\n\t\t\t// these\r\n\t\t\tvar scaleLabelMoments = [];\r\n\t\t\tif (me.chart.data.labels && me.chart.data.labels.length > 0) {\r\n\t\t\t\thelpers.each(me.chart.data.labels, function(label) {\r\n\t\t\t\t\tvar labelMoment = me.parseTime(label);\r\n\r\n\t\t\t\t\tif (labelMoment.isValid()) {\r\n\t\t\t\t\t\tif (me.options.time.round) {\r\n\t\t\t\t\t\t\tlabelMoment.startOf(me.options.time.round);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tscaleLabelMoments.push(labelMoment);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, me);\r\n\r\n\t\t\t\tme.firstTick = moment.min.call(me, scaleLabelMoments);\r\n\t\t\t\tme.lastTick = moment.max.call(me, scaleLabelMoments);\r\n\t\t\t} else {\r\n\t\t\t\tme.firstTick = null;\r\n\t\t\t\tme.lastTick = null;\r\n\t\t\t}\r\n\r\n\t\t\thelpers.each(me.chart.data.datasets, function(dataset, datasetIndex) {\r\n\t\t\t\tvar momentsForDataset = [];\r\n\t\t\t\tvar datasetVisible = me.chart.isDatasetVisible(datasetIndex);\r\n\r\n\t\t\t\tif (typeof dataset.data[0] === 'object' && dataset.data[0] !== null) {\r\n\t\t\t\t\thelpers.each(dataset.data, function(value) {\r\n\t\t\t\t\t\tvar labelMoment = me.parseTime(me.getRightValue(value));\r\n\r\n\t\t\t\t\t\tif (labelMoment.isValid()) {\r\n\t\t\t\t\t\t\tif (me.options.time.round) {\r\n\t\t\t\t\t\t\t\tlabelMoment.startOf(me.options.time.round);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmomentsForDataset.push(labelMoment);\r\n\r\n\t\t\t\t\t\t\tif (datasetVisible) {\r\n\t\t\t\t\t\t\t\t// May have gone outside the scale ranges, make sure we keep the first and last ticks updated\r\n\t\t\t\t\t\t\t\tme.firstTick = me.firstTick !== null ? moment.min(me.firstTick, labelMoment) : labelMoment;\r\n\t\t\t\t\t\t\t\tme.lastTick = me.lastTick !== null ? moment.max(me.lastTick, labelMoment) : labelMoment;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, me);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// We have no labels. Use the ones from the scale\r\n\t\t\t\t\tmomentsForDataset = scaleLabelMoments;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tme.labelMoments.push(momentsForDataset);\r\n\t\t\t}, me);\r\n\r\n\t\t\t// Set these after we've done all the data\r\n\t\t\tif (me.options.time.min) {\r\n\t\t\t\tme.firstTick = me.parseTime(me.options.time.min);\r\n\t\t\t}\r\n\r\n\t\t\tif (me.options.time.max) {\r\n\t\t\t\tme.lastTick = me.parseTime(me.options.time.max);\r\n\t\t\t}\r\n\r\n\t\t\t// We will modify these, so clone for later\r\n\t\t\tme.firstTick = (me.firstTick || moment()).clone();\r\n\t\t\tme.lastTick = (me.lastTick || moment()).clone();\r\n\t\t},\r\n\t\tbuildTicks: function() {\r\n\t\t\tvar me = this;\r\n\r\n\t\t\tme.ctx.save();\r\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(me.options.ticks.fontSize, Chart.defaults.global.defaultFontSize);\r\n\t\t\tvar tickFontStyle = helpers.getValueOrDefault(me.options.ticks.fontStyle, Chart.defaults.global.defaultFontStyle);\r\n\t\t\tvar tickFontFamily = helpers.getValueOrDefault(me.options.ticks.fontFamily, Chart.defaults.global.defaultFontFamily);\r\n\t\t\tvar tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);\r\n\t\t\tme.ctx.font = tickLabelFont;\r\n\r\n\t\t\tme.ticks = [];\r\n\t\t\tme.unitScale = 1; // How much we scale the unit by, ie 2 means 2x unit per step\r\n\t\t\tme.scaleSizeInUnits = 0; // How large the scale is in the base unit (seconds, minutes, etc)\r\n\r\n\t\t\t// Set unit override if applicable\r\n\t\t\tif (me.options.time.unit) {\r\n\t\t\t\tme.tickUnit = me.options.time.unit || 'day';\r\n\t\t\t\tme.displayFormat = me.options.time.displayFormats[me.tickUnit];\r\n\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\r\n\t\t\t\tme.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, 1);\r\n\t\t\t} else {\r\n\t\t\t\t// Determine the smallest needed unit of the time\r\n\t\t\t\tvar innerWidth = me.isHorizontal() ? me.width - (me.paddingLeft + me.paddingRight) : me.height - (me.paddingTop + me.paddingBottom);\r\n\r\n\t\t\t\t// Crude approximation of what the label length might be\r\n\t\t\t\tvar tempFirstLabel = me.tickFormatFunction(me.firstTick, 0, []);\r\n\t\t\t\tvar tickLabelWidth = me.ctx.measureText(tempFirstLabel).width;\r\n\t\t\t\tvar cosRotation = Math.cos(helpers.toRadians(me.options.ticks.maxRotation));\r\n\t\t\t\tvar sinRotation = Math.sin(helpers.toRadians(me.options.ticks.maxRotation));\r\n\t\t\t\ttickLabelWidth = (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation);\r\n\t\t\t\tvar labelCapacity = innerWidth / (tickLabelWidth);\r\n\r\n\t\t\t\t// Start as small as possible\r\n\t\t\t\tme.tickUnit = 'millisecond';\r\n\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\r\n\t\t\t\tme.displayFormat = me.options.time.displayFormats[me.tickUnit];\r\n\r\n\t\t\t\tvar unitDefinitionIndex = 0;\r\n\t\t\t\tvar unitDefinition = time.units[unitDefinitionIndex];\r\n\r\n\t\t\t\t// While we aren't ideal and we don't have units left\r\n\t\t\t\twhile (unitDefinitionIndex < time.units.length) {\r\n\t\t\t\t\t// Can we scale this unit. If `false` we can scale infinitely\r\n\t\t\t\t\tme.unitScale = 1;\r\n\r\n\t\t\t\t\tif (helpers.isArray(unitDefinition.steps) && Math.ceil(me.scaleSizeInUnits / labelCapacity) < helpers.max(unitDefinition.steps)) {\r\n\t\t\t\t\t\t// Use one of the prefedined steps\r\n\t\t\t\t\t\tfor (var idx = 0; idx < unitDefinition.steps.length; ++idx) {\r\n\t\t\t\t\t\t\tif (unitDefinition.steps[idx] >= Math.ceil(me.scaleSizeInUnits / labelCapacity)) {\r\n\t\t\t\t\t\t\t\tme.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, unitDefinition.steps[idx]);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else if ((unitDefinition.maxStep === false) || (Math.ceil(me.scaleSizeInUnits / labelCapacity) < unitDefinition.maxStep)) {\r\n\t\t\t\t\t\t// We have a max step. Scale this unit\r\n\t\t\t\t\t\tme.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, Math.ceil(me.scaleSizeInUnits / labelCapacity));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Move to the next unit up\r\n\t\t\t\t\t\t++unitDefinitionIndex;\r\n\t\t\t\t\t\tunitDefinition = time.units[unitDefinitionIndex];\r\n\r\n\t\t\t\t\t\tme.tickUnit = unitDefinition.name;\r\n\t\t\t\t\t\tvar leadingUnitBuffer = me.firstTick.diff(me.getMomentStartOf(me.firstTick), me.tickUnit, true);\r\n\t\t\t\t\t\tvar trailingUnitBuffer = me.getMomentStartOf(me.lastTick.clone().add(1, me.tickUnit)).diff(me.lastTick, me.tickUnit, true);\r\n\t\t\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true) + leadingUnitBuffer + trailingUnitBuffer;\r\n\t\t\t\t\t\tme.displayFormat = me.options.time.displayFormats[unitDefinition.name];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar roundedStart;\r\n\r\n\t\t\t// Only round the first tick if we have no hard minimum\r\n\t\t\tif (!me.options.time.min) {\r\n\t\t\t\tme.firstTick = me.getMomentStartOf(me.firstTick);\r\n\t\t\t\troundedStart = me.firstTick;\r\n\t\t\t} else {\r\n\t\t\t\troundedStart = me.getMomentStartOf(me.firstTick);\r\n\t\t\t}\r\n\r\n\t\t\t// Only round the last tick if we have no hard maximum\r\n\t\t\tif (!me.options.time.max) {\r\n\t\t\t\tvar roundedEnd = me.getMomentStartOf(me.lastTick);\r\n\t\t\t\tvar delta = roundedEnd.diff(me.lastTick, me.tickUnit, true);\r\n\t\t\t\tif (delta < 0) {\r\n\t\t\t\t\t// Do not use end of because we need me to be in the next time unit\r\n\t\t\t\t\tme.lastTick = me.getMomentStartOf(me.lastTick.add(1, me.tickUnit));\r\n\t\t\t\t} else if (delta >= 0) {\r\n\t\t\t\t\tme.lastTick = roundedEnd;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\r\n\t\t\t}\r\n\r\n\t\t\t// Tick displayFormat override\r\n\t\t\tif (me.options.time.displayFormat) {\r\n\t\t\t\tme.displayFormat = me.options.time.displayFormat;\r\n\t\t\t}\r\n\r\n\t\t\t// first tick. will have been rounded correctly if options.time.min is not specified\r\n\t\t\tme.ticks.push(me.firstTick.clone());\r\n\r\n\t\t\t// For every unit in between the first and last moment, create a moment and add it to the ticks tick\r\n\t\t\tfor (var i = 1; i <= me.scaleSizeInUnits; ++i) {\r\n\t\t\t\tvar newTick = roundedStart.clone().add(i, me.tickUnit);\r\n\r\n\t\t\t\t// Are we greater than the max time\r\n\t\t\t\tif (me.options.time.max && newTick.diff(me.lastTick, me.tickUnit, true) >= 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (i % me.unitScale === 0) {\r\n\t\t\t\t\tme.ticks.push(newTick);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Always show the right tick\r\n\t\t\tvar diff = me.ticks[me.ticks.length - 1].diff(me.lastTick, me.tickUnit);\r\n\t\t\tif (diff !== 0 || me.scaleSizeInUnits === 0) {\r\n\t\t\t\t// this is a weird case. If the <max> option is the same as the end option, we can't just diff the times because the tick was created from the roundedStart\r\n\t\t\t\t// but the last tick was not rounded.\r\n\t\t\t\tif (me.options.time.max) {\r\n\t\t\t\t\tme.ticks.push(me.lastTick.clone());\r\n\t\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.ticks[0], me.tickUnit, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tme.ticks.push(me.lastTick.clone());\r\n\t\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tme.ctx.restore();\r\n\t\t},\r\n\t\t// Get tooltip label\r\n\t\tgetLabelForIndex: function(index, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar label = me.chart.data.labels && index < me.chart.data.labels.length ? me.chart.data.labels[index] : '';\r\n\r\n\t\t\tif (typeof me.chart.data.datasets[datasetIndex].data[0] === 'object') {\r\n\t\t\t\tlabel = me.getRightValue(me.chart.data.datasets[datasetIndex].data[index]);\r\n\t\t\t}\r\n\r\n\t\t\t// Format nicely\r\n\t\t\tif (me.options.time.tooltipFormat) {\r\n\t\t\t\tlabel = me.parseTime(label).format(me.options.time.tooltipFormat);\r\n\t\t\t}\r\n\r\n\t\t\treturn label;\r\n\t\t},\r\n\t\t// Function to format an individual tick mark\r\n\t\ttickFormatFunction: function(tick, index, ticks) {\r\n\t\t\tvar formattedTick = tick.format(this.displayFormat);\r\n\t\t\tvar tickOpts = this.options.ticks;\r\n\t\t\tvar callback = helpers.getValueOrDefault(tickOpts.callback, tickOpts.userCallback);\r\n\r\n\t\t\tif (callback) {\r\n\t\t\t\treturn callback(formattedTick, index, ticks);\r\n\t\t\t} else {\r\n\t\t\t\treturn formattedTick;\r\n\t\t\t}\r\n\t\t},\r\n\t\tconvertTicksToLabels: function() {\r\n\t\t\tvar me = this;\r\n\t\t\tme.tickMoments = me.ticks;\r\n\t\t\tme.ticks = me.ticks.map(me.tickFormatFunction, me);\r\n\t\t},\r\n\t\tgetPixelForValue: function(value, index, datasetIndex) {\r\n\t\t\tvar me = this;\r\n\t\t\tif (!value || !value.isValid) {\r\n\t\t\t\t// not already a moment object\r\n\t\t\t\tvalue = me.parseTime(me.getRightValue(value));\r\n\t\t\t}\r\n\t\t\tvar labelMoment = value && value.isValid && value.isValid() ? value : me.getLabelMoment(datasetIndex, index);\r\n\r\n\t\t\tif (labelMoment) {\r\n\t\t\t\tvar offset = labelMoment.diff(me.firstTick, me.tickUnit, true);\r\n\r\n\t\t\t\tvar decimal = offset !== 0 ? offset / me.scaleSizeInUnits : offset;\r\n\r\n\t\t\t\tif (me.isHorizontal()) {\r\n\t\t\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\r\n\t\t\t\t\tvar valueOffset = (innerWidth * decimal) + me.paddingLeft;\r\n\r\n\t\t\t\t\treturn me.left + Math.round(valueOffset);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar innerHeight = me.height - (me.paddingTop + me.paddingBottom);\r\n\t\t\t\t\tvar heightOffset = (innerHeight * decimal) + me.paddingTop;\r\n\r\n\t\t\t\t\treturn me.top + Math.round(heightOffset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetPixelForTick: function(index) {\r\n\t\t\treturn this.getPixelForValue(this.tickMoments[index], null, null);\r\n\t\t},\r\n\t\tgetValueForPixel: function(pixel) {\r\n\t\t\tvar me = this;\r\n\t\t\tvar innerDimension = me.isHorizontal() ? me.width - (me.paddingLeft + me.paddingRight) : me.height - (me.paddingTop + me.paddingBottom);\r\n\t\t\tvar offset = (pixel - (me.isHorizontal() ? me.left + me.paddingLeft : me.top + me.paddingTop)) / innerDimension;\r\n\t\t\toffset *= me.scaleSizeInUnits;\r\n\t\t\treturn me.firstTick.clone().add(moment.duration(offset, me.tickUnit).asSeconds(), 'seconds');\r\n\t\t},\r\n\t\tparseTime: function(label) {\r\n\t\t\tvar me = this;\r\n\t\t\tif (typeof me.options.time.parser === 'string') {\r\n\t\t\t\treturn moment(label, me.options.time.parser);\r\n\t\t\t}\r\n\t\t\tif (typeof me.options.time.parser === 'function') {\r\n\t\t\t\treturn me.options.time.parser(label);\r\n\t\t\t}\r\n\t\t\t// Date objects\r\n\t\t\tif (typeof label.getMonth === 'function' || typeof label === 'number') {\r\n\t\t\t\treturn moment(label);\r\n\t\t\t}\r\n\t\t\t// Moment support\r\n\t\t\tif (label.isValid && label.isValid()) {\r\n\t\t\t\treturn label;\r\n\t\t\t}\r\n\t\t\t// Custom parsing (return an instance of moment)\r\n\t\t\tif (typeof me.options.time.format !== 'string' && me.options.time.format.call) {\r\n\t\t\t\tconsole.warn(\"options.time.format is deprecated and replaced by options.time.parser. See http://nnnick.github.io/Chart.js/docs-v2/#scales-time-scale\");\r\n\t\t\t\treturn me.options.time.format(label);\r\n\t\t\t}\r\n\t\t\t// Moment format parsing\r\n\t\t\treturn moment(label, me.options.time.format);\r\n\t\t}\r\n\t});\r\n\tChart.scaleService.registerScaleType(\"time\", TimeScale, defaultConfig);\r\n\r\n};\r\n\r\n},{\"6\":6}]},{},[7])(7)\r\n});"

/***/ },

/***/ 760:
/***/ function(module, exports) {

module.exports = "/*!jQuery Kontrol*/\r\n/**\r\n * Small extensible jQuery library of new UI controls ;\r\n * Dial (was jQuery Knob), XY pad, Bars.\r\n *\r\n * Version: 0.9.0 (15/07/2012)\r\n * Requires: jQuery v1.7+\r\n *\r\n * Copyright (c) 2012 Anthony Terrien\r\n * Under MIT and GPL licenses:\r\n *  http://www.opensource.org/licenses/mit-license.php\r\n *  http://www.gnu.org/licenses/gpl.html\r\n *\r\n * Thanks to vor, eskimoblood, spiffistan, FabrizioC\r\n */\r\n(function($) {\r\n\r\n    /**\r\n     * Kontrol library\r\n     */\r\n    \"use strict\";\r\n\r\n    /**\r\n     * Definition of globals and core\r\n     */\r\n    var k = {}, // kontrol\r\n        max = Math.max,\r\n        min = Math.min;\r\n\r\n    k.c = {};\r\n    k.c.d = $(document);\r\n    k.c.t = function (e) {\r\n        return e.originalEvent.touches.length - 1;\r\n    };\r\n\r\n    /**\r\n     * Kontrol Object\r\n     *\r\n     * Definition of an abstract UI control\r\n     *\r\n     * Each concrete component must call this one.\r\n     * <code>\r\n     * k.o.call(this);\r\n     * </code>\r\n     */\r\n    k.o = function () {\r\n        var s = this;\r\n\r\n        this.o = null; // array of options\r\n        this.$ = null; // jQuery wrapped element\r\n        this.i = null; // mixed HTMLInputElement or array of HTMLInputElement\r\n        this.g = null; // 2D graphics context for 'pre-rendering'\r\n        this.v = null; // value ; mixed array or integer\r\n        this.cv = null; // change value ; not commited value\r\n        this.x = 0; // canvas x position\r\n        this.y = 0; // canvas y position\r\n        this.mx = 0; // x value of mouse down point of the current mouse move\r\n        this.my = 0; // y value of mouse down point of the current mose move\r\n        this.$c = null; // jQuery canvas element\r\n        this.c = null; // rendered canvas context\r\n        this.t = 0; // touches index\r\n        this.isInit = false;\r\n        this.fgColor = null; // main color\r\n        this.pColor = null; // previous color\r\n        this.sH = null; // start hook\r\n        this.dH = null; // draw hook\r\n        this.cH = null; // change hook\r\n        this.eH = null; // cancel hook\r\n        this.rH = null; // release hook\r\n\r\n        this.run = function () {\r\n            var cf = function (e, conf) {\r\n                var k;\r\n                for (k in conf) {\r\n                    s.o[k] = conf[k];\r\n                }\r\n                s.init();\r\n                s._configure()\r\n                 ._draw();\r\n            };\r\n\r\n            if(this.$.data('kontroled')) return;\r\n            this.$.data('kontroled', true);\r\n\r\n            this.extend();\r\n            this.o = $.extend(\r\n                {\r\n                    // Config\r\n                    min : this.$.data('min') || 0,\r\n                    max : this.$.data('max') || 100,\r\n                    stopper : true,\r\n                    readOnly : this.$.data('readonly'),\r\n                    noScroll : this.$.data('noScroll'),\r\n\r\n                    // UI\r\n                    cursor : (this.$.data('cursor') === true && 30)\r\n                                || this.$.data('cursor')\r\n                                || 0,\r\n                    thickness : this.$.data('thickness') || 0.35,\r\n                    width : this.$.data('width') || 200,\r\n                    height : this.$.data('height') || 200,\r\n                    displayInput : this.$.data('displayinput') == null || this.$.data('displayinput'),\r\n                    displayPrevious : this.$.data('displayprevious'),\r\n                    fgColor : this.$.data('fgcolor') || '#87CEEB',\r\n                    inline : false,\r\n                    //context : {'lineCap' : 'butt'},\r\n\r\n                    // Hooks\r\n                    start:null,  // function () {}\r\n                    draw : null, // function () {}\r\n                    change : null, // function (value) {}\r\n                    cancel : null, // function () {}\r\n                    release : null // function (value) {}\r\n                }, this.o\r\n            );\r\n\r\n            // routing value\r\n            if(this.$.is('fieldset')) {\r\n\r\n                // fieldset = array of integer\r\n                this.v = {};\r\n                this.i = this.$.find('input')\r\n                this.i.each(function(k) {\r\n                    var $this = $(this);\r\n                    s.i[k] = $this;\r\n                    s.v[k] = $this.val();\r\n\r\n                    $this.bind(\r\n                        'change'\r\n                        , function () {\r\n                            var val = {};\r\n                            val[k] = $this.val();\r\n                            s.val(val);\r\n                        }\r\n                    );\r\n                });\r\n                this.$.find('legend').remove();\r\n\r\n            } else {\r\n                // input = integer\r\n                this.i = this.$;\r\n                this.v = this.$.val();\r\n                (this.v == '') && (this.v = this.o.min);\r\n\r\n                this.$.bind(\r\n                    'change'\r\n                    , function () {\r\n                        s.val(s.$.val());\r\n                    }\r\n                );\r\n            }\r\n\r\n            (!this.o.displayInput) && this.$.hide();\r\n\r\n            this.$c = $('<canvas width=\"' +\r\n                            this.o.width + 'px\" height=\"' +\r\n                            this.o.height + 'px\"></canvas>');\r\n            this.c = this.$c[0].getContext(\"2d\");\r\n\r\n            this.$\r\n                .wrap($('<div style=\"' + (this.o.inline ? 'display:inline;' : '') +\r\n                        'width:' + this.o.width + 'px;height:' +\r\n                        this.o.height + 'px;\"></div>'))\r\n                .before(this.$c);\r\n\r\n            if (this.v instanceof Object) {\r\n                this.cv = {};\r\n                this.copy(this.v, this.cv);\r\n            } else {\r\n                this.cv = this.v;\r\n            }\r\n\r\n            this.$\r\n                .bind(\"configure\", cf)\r\n                .parent()\r\n                .bind(\"configure\", cf);\r\n\r\n            this._listen()\r\n                ._configure()\r\n                ._xy()\r\n                .init();\r\n\r\n            this.isInit = true;\r\n\r\n            this._draw();\r\n\r\n            return this;\r\n        };\r\n\r\n        this._draw = function () {\r\n\r\n            // canvas pre-rendering\r\n            var d = true,\r\n                c = document.createElement('canvas');\r\n\r\n            c.width = s.o.width;\r\n            c.height = s.o.height;\r\n            s.g = c.getContext('2d');\r\n\r\n            s.clear();\r\n\r\n            s.dH\r\n            && (d = s.dH());\r\n\r\n            (d !== false) && s.draw();\r\n\r\n            s.c.drawImage(c, 0, 0);\r\n            c = null;\r\n        };\r\n\r\n        this._touch = function (e) {\r\n\r\n            var touchMove = function (e) {\r\n\r\n                var v = s.xy2val(\r\n                            e.originalEvent.touches[s.t].pageX,\r\n                            e.originalEvent.touches[s.t].pageY,\r\n                            'touch'\r\n                            );\r\n\r\n                if (v == s.cv) return;\r\n\r\n                if (\r\n                    s.cH\r\n                    && (s.cH(v) === false)\r\n                ) return;\r\n\r\n\r\n                s.change(v);\r\n                s._draw();\r\n            };\r\n\r\n            // get touches index\r\n            this.t = k.c.t(e);\r\n\r\n            if (\r\n                this.sH\r\n                && (this.sH() === false)\r\n            ) return;\r\n\r\n            // First touch\r\n            touchMove(e);\r\n\r\n            // Touch events listeners\r\n            k.c.d\r\n                .bind(\"touchmove.k\", touchMove)\r\n                .bind(\r\n                    \"touchend.k\"\r\n                    , function () {\r\n                        k.c.d.unbind('touchmove.k touchend.k');\r\n\r\n                        if (\r\n                            s.rH\r\n                            && (s.rH(s.cv) === false)\r\n                        ) return;\r\n\r\n                        s.val(s.cv);\r\n                    }\r\n                );\r\n\r\n            return this;\r\n        };\r\n\r\n        this._mouse = function (e) {\r\n\r\n            var mouseMove = function (e) {\r\n                var v = s.xy2val(e.pageX, e.pageY, 'mouse');\r\n                if (v == s.cv) return;\r\n\r\n                if (\r\n                    s.cH\r\n                    && (s.cH(v) === false)\r\n                ) return;\r\n\r\n                s.change(v);\r\n                s._draw();\r\n            };\r\n\r\n            if (\r\n                this.sH\r\n                && (this.sH() === false)\r\n            ) return;\r\n\r\n            // First click\r\n            s.mx = e.pageX;\r\n            s.my = e.pageY;\r\n            mouseMove(e);\r\n\r\n            // Mouse events listeners\r\n            k.c.d\r\n                .bind(\"mousemove.k\", mouseMove)\r\n                .bind(\r\n                    // Escape key cancel current change\r\n                    \"keyup.k\"\r\n                    , function (e) {\r\n                        if (e.keyCode === 27) {\r\n                            k.c.d.unbind(\"mouseup.k mousemove.k keyup.k\");\r\n\r\n                            if (\r\n                                s.eH\r\n                                && (s.eH() === false)\r\n                            ) return;\r\n\r\n                            s.cancel();\r\n                        }\r\n                    }\r\n                )\r\n                .bind(\r\n                    \"mouseup.k\"\r\n                    , function (e) {\r\n                        k.c.d.unbind('mousemove.k mouseup.k keyup.k');\r\n\r\n                        if (\r\n                            s.rH\r\n                            && (s.rH(s.cv) === false)\r\n                        ) return;\r\n\r\n                        s.val(s.cv);\r\n                    }\r\n                );\r\n\r\n            return this;\r\n        };\r\n\r\n        this._xy = function () {\r\n            var o = this.$c.offset();\r\n            this.x = o.left;\r\n            this.y = o.top;\r\n            return this;\r\n        };\r\n\r\n        this._listen = function () {\r\n\r\n            if (!this.o.readOnly) {\r\n                this.$c\r\n                    .bind(\r\n                        \"mousedown\"\r\n                        , function (e) {\r\n                            e.preventDefault();\r\n                            s._xy()._mouse(e);\r\n                         }\r\n                    )\r\n                    .bind(\r\n                        \"touchstart\"\r\n                        , function (e) {\r\n                            e.preventDefault();\r\n                            s._xy()._touch(e);\r\n                         }\r\n                    );\r\n                this.listen();\r\n            } else {\r\n                this.$.attr('readonly', 'readonly');\r\n            }\r\n\r\n            return this;\r\n        };\r\n\r\n        this._configure = function () {\r\n\r\n            // Hooks\r\n            if (this.o.start) this.sH = this.o.start;\r\n            if (this.o.draw) this.dH = this.o.draw;\r\n            if (this.o.change) this.cH = this.o.change;\r\n            if (this.o.cancel) this.eH = this.o.cancel;\r\n            if (this.o.release) this.rH = this.o.release;\r\n\r\n            if (this.o.displayPrevious) {\r\n                this.pColor = this.h2rgba(this.o.fgColor, \"0.4\");\r\n                this.fgColor = this.h2rgba(this.o.fgColor, \"0.6\");\r\n            } else {\r\n                this.fgColor = this.o.fgColor;\r\n            }\r\n\r\n            return this;\r\n        };\r\n\r\n        this._clear = function () {\r\n            this.$c[0].width = this.$c[0].width;\r\n        };\r\n\r\n        // Abstract methods\r\n        this.listen = function () {}; // on start, one time\r\n        this.extend = function () {}; // each time configure triggered\r\n        this.init = function () {}; // each time configure triggered\r\n        this.change = function (v) {}; // on change\r\n        this.val = function (v) {}; // on release\r\n        this.xy2val = function (x, y, method) {}; //\r\n        this.draw = function () {}; // on change / on release\r\n        this.clear = function () { this._clear(); };\r\n\r\n        // Utils\r\n        this.h2rgba = function (h, a) {\r\n            var rgb;\r\n            h = h.substring(1,7)\r\n            rgb = [parseInt(h.substring(0,2),16)\r\n                   ,parseInt(h.substring(2,4),16)\r\n                   ,parseInt(h.substring(4,6),16)];\r\n            return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + a + \")\";\r\n        };\r\n\r\n        this.copy = function (f, t) {\r\n            for (var i in f) { t[i] = f[i]; }\r\n        };\r\n    };\r\n\r\n\r\n    /**\r\n     * k.Dial\r\n     */\r\n    k.Dial = function () {\r\n        k.o.call(this);\r\n\r\n        this.startAngle = null;\r\n        this.xy = null;\r\n        this.radius = null;\r\n        this.lineWidth = null;\r\n        this.cursorExt = null;\r\n        this.w2 = null;\r\n        this.PI2 = 2*Math.PI;\r\n\r\n        this.extend = function () {\r\n            this.o = $.extend(\r\n                {\r\n                    bgColor : this.$.data('bgcolor') || '#EEEEEE',\r\n                    angleOffset : this.$.data('angleoffset') || 0,\r\n                    angleArc : this.$.data('anglearc') || 360,\r\n                    flatMouse : this.$.data('flatMouse'),\r\n                    inline : true\r\n                }, this.o\r\n            );\r\n        };\r\n\r\n        this.val = function (v) {\r\n            if (null != v) {\r\n                this.cv = this.o.stopper ? max(min(v, this.o.max), this.o.min) : v;\r\n                this.v = this.cv;\r\n                this.$.val(this.v);\r\n                this._draw();\r\n            } else {\r\n                return this.v;\r\n            }\r\n        };\r\n\r\n        this.xy2val = function (x, y, m) {\r\n            var a, ret;\r\n\r\n            if ((m === 'mouse') && (this.o.flatMouse)) {\r\n                a = ((this.my - y) + (x - this.mx)) / (this.o.height);\r\n                ret = ~~ (a * (this.o.max - this.o.min) + parseFloat(this.v));\r\n                ret = max(min(ret, this.o.max), this.o.min);\r\n            } else {\r\n                a = Math.atan2(\r\n                    x - (this.x + this.w2)\r\n                    , - (y - this.y - this.w2)\r\n                ) - this.angleOffset;\r\n\r\n                if(this.angleArc != this.PI2 && (a < 0) && (a > -0.5)) {\r\n                    // if isset angleArc option, set to min if .5 under min\r\n                    a = 0;\r\n                } else if (a < 0) {\r\n                    a += this.PI2;\r\n                }\r\n\r\n                ret = ~~ (0.5 + (a * (this.o.max - this.o.min) / this.angleArc))\r\n                    + this.o.min;\r\n            }\r\n\r\n            this.o.stopper\r\n            && (ret = max(min(ret, this.o.max), this.o.min));\r\n\r\n            return ret;\r\n        };\r\n\r\n        this.listen = function () {\r\n            // bind MouseWheel\r\n            var s = this,\r\n                mw = function (e) {\r\n                            if(s.o.noScroll)\r\n                                return;\r\n\r\n                            e.preventDefault();\r\n\r\n                            var ori = e.originalEvent\r\n                                ,deltaX = ori.detail || ori.wheelDeltaX\r\n                                ,deltaY = ori.detail || ori.wheelDeltaY\r\n                                ,v = parseInt(s.$.val()) + (deltaX>0 || deltaY>0 ? 1 : deltaX<0 || deltaY<0 ? -1 : 0);\r\n\r\n                            if (\r\n                                s.cH\r\n                                && (s.cH(v) === false)\r\n                            ) return;\r\n\r\n                            s.val(v);\r\n                        }\r\n                , kval, to, m = 1, kv = {37:-1, 38:1, 39:1, 40:-1};\r\n\r\n            this.$\r\n                .bind(\r\n                    \"keydown\"\r\n                    ,function (e) {\r\n\r\n                        var kc = e.keyCode;\r\n\r\n                        // numpad support\r\n                        if(kc >= 96 && kc <= 105) {\r\n                            kc = e.keyCode = kc - 48;\r\n                        }\r\n\r\n                        kval = parseInt(String.fromCharCode(kc));\r\n\r\n                        if (isNaN(kval)) {\r\n\r\n                            (kc !== 13)         // enter\r\n                            && (kc !== 8)       // bs\r\n                            && (kc !== 9)       // tab\r\n                            && (kc !== 189)     // -\r\n                            && e.preventDefault();\r\n\r\n                            // arrows\r\n                            if ($.inArray(kc,[37,38,39,40]) > -1) {\r\n                                e.preventDefault();\r\n\r\n                                var v = parseInt(s.$.val()) + kv[kc] * m;\r\n\r\n                                s.o.stopper\r\n                                && (v = max(min(v, s.o.max), s.o.min));\r\n\r\n                                s.change(v);\r\n                                s._draw();\r\n\r\n                                // long time keydown speed-up\r\n                                to = window.setTimeout(\r\n                                    function () { m*=2; }\r\n                                    ,30\r\n                                );\r\n                            }\r\n                        }\r\n                    }\r\n                )\r\n                .bind(\r\n                    \"keyup\"\r\n                    ,function (e) {\r\n                        if (isNaN(kval)) {\r\n                            if (to) {\r\n                                window.clearTimeout(to);\r\n                                to = null;\r\n                                m = 1;\r\n                                s.val(s.$.val());\r\n                            }\r\n                        } else {\r\n                            // kval postcond\r\n                            (s.$.val() > s.o.max && s.$.val(s.o.max))\r\n                            || (s.$.val() < s.o.min && s.$.val(s.o.min));\r\n                        }\r\n\r\n                    }\r\n                );\r\n\r\n            this.$c.bind(\"mousewheel DOMMouseScroll\", mw);\r\n            this.$.bind(\"mousewheel DOMMouseScroll\", mw)\r\n        };\r\n\r\n        this.init = function () {\r\n\r\n            if (\r\n                this.v < this.o.min\r\n                || this.v > this.o.max\r\n            ) this.v = this.o.min;\r\n\r\n            this.$.val(this.v);\r\n            this.w2 = this.o.width / 2;\r\n            this.cursorExt = this.o.cursor / 100;\r\n            this.xy = this.w2;\r\n            this.lineWidth = this.xy * this.o.thickness;\r\n            this.radius = this.xy - this.lineWidth / 2;\r\n\r\n            this.o.angleOffset\r\n            && (this.o.angleOffset = isNaN(this.o.angleOffset) ? 0 : this.o.angleOffset);\r\n\r\n            this.o.angleArc\r\n            && (this.o.angleArc = isNaN(this.o.angleArc) ? this.PI2 : this.o.angleArc);\r\n\r\n            // deg to rad\r\n            this.angleOffset = this.o.angleOffset * Math.PI / 180;\r\n            this.angleArc = this.o.angleArc * Math.PI / 180;\r\n\r\n            // compute start and end angles\r\n            this.startAngle = 1.5 * Math.PI + this.angleOffset;\r\n            this.endAngle = 1.5 * Math.PI + this.angleOffset + this.angleArc;\r\n\r\n            var s = max(\r\n                            String(Math.abs(this.o.max)).length\r\n                            , String(Math.abs(this.o.min)).length\r\n                            , 2\r\n                            ) + 2;\r\n\r\n            this.o.displayInput\r\n                && this.i.css({\r\n                        'width' : ((this.o.width / 2 + 4) >> 0) + 'px'\r\n                        ,'height' : ((this.o.width / 3) >> 0) + 'px'\r\n                        ,'position' : 'absolute'\r\n                        ,'vertical-align' : 'middle'\r\n                        ,'margin-top' : ((this.o.width / 3) >> 0) + 'px'\r\n                        ,'margin-left' : '-' + ((this.o.width * 3 / 4 + 2) >> 0) + 'px'\r\n                        ,'border' : 0\r\n                        ,'background' : 'none'\r\n                        ,'font' : 'bold ' + ((this.o.width / s) >> 0) + 'px Arial'\r\n                        ,'text-align' : 'center'\r\n                        ,'color' : this.o.fgColor\r\n                        ,'padding' : '0px'\r\n                        ,'-webkit-appearance': 'none'\r\n                        })\r\n                || this.i.css({\r\n                        'width' : '0px'\r\n                        ,'visibility' : 'hidden'\r\n                        });\r\n        };\r\n\r\n        this.change = function (v) {\r\n            this.cv = v;\r\n            this.$.val(v);\r\n        };\r\n\r\n        this.angle = function (v) {\r\n            return (v - this.o.min) * this.angleArc / (this.o.max - this.o.min);\r\n        };\r\n\r\n        this.draw = function () {\r\n\r\n            var c = this.g,                 // context\r\n                a = this.angle(this.cv)    // Angle\r\n                , sat = this.startAngle     // Start angle\r\n                , eat = sat + a             // End angle\r\n                , sa, ea                    // Previous angles\r\n                , r = 1;\r\n\r\n            c.lineWidth = this.lineWidth;\r\n\r\n            /*for(o in this.o.context) {\r\n                c[o] = this.o.context[o];\r\n            }*/\r\n\r\n            this.o.cursor\r\n                && (sat = eat - this.cursorExt)\r\n                && (eat = eat + this.cursorExt);\r\n\r\n            c.beginPath();\r\n                c.strokeStyle = this.o.bgColor;\r\n                c.arc(this.xy, this.xy, this.radius, this.endAngle, this.startAngle, true);\r\n            c.stroke();\r\n\r\n            if (this.o.displayPrevious) {\r\n                ea = this.startAngle + this.angle(this.v);\r\n                sa = this.startAngle;\r\n                this.o.cursor\r\n                    && (sa = ea - this.cursorExt)\r\n                    && (ea = ea + this.cursorExt);\r\n\r\n                c.beginPath();\r\n                    c.strokeStyle = this.pColor;\r\n                    c.arc(this.xy, this.xy, this.radius, sa, ea, false);\r\n                c.stroke();\r\n                r = (this.cv == this.v);\r\n            }\r\n\r\n            c.beginPath();\r\n                c.strokeStyle = r ? this.o.fgColor : this.fgColor ;\r\n                c.arc(this.xy, this.xy, this.radius, sat, eat, false);\r\n            c.stroke();\r\n        };\r\n\r\n        this.cancel = function () {\r\n            this.val(this.v);\r\n        };\r\n    };\r\n\r\n    $.fn.dial = $.fn.knob = function (o) {\r\n        return this.each(\r\n            function () {\r\n                var d = new k.Dial();\r\n                d.o = o;\r\n                d.$ = $(this);\r\n                d.run();\r\n            }\r\n        ).parent();\r\n    };\r\n\r\n\r\n    /**\r\n     * k.XY\r\n     */\r\n    k.XY = function () {\r\n        k.o.call(this);\r\n\r\n        this.m = [];\r\n        this.p = [];\r\n        this.f = []; // factor\r\n        this.s = {0:1,1:-1};\r\n        this.cur2 = 0;\r\n        this.cursor = 0;\r\n        this.v = {};\r\n        this.div = null;\r\n\r\n        this.extend = function () {\r\n            this.o = $.extend(\r\n                {\r\n                    min : this.$.data('min') || 0,\r\n                    max : this.$.data('max') || 100,\r\n                    width : this.$.data('width') || 200,\r\n                    height : this.$.data('height') || 200\r\n                }, this.o\r\n            );\r\n        };\r\n\r\n        this._coord = function() {\r\n            for(var i in this.v) {\r\n                this.m[i] = ~~ (0.5 + ((this.s[i] * this.v[i] - this.o.min) / this.f[i]) + this.cur2) ;\r\n                this.p[i] = this.m[i];\r\n            }\r\n        };\r\n\r\n        this.init = function () {\r\n            this.cursor = this.o.cursor || 30;\r\n            this.cur2 = this.cursor / 2;\r\n\r\n            this.f[0] = (this.o.max - this.o.min) / (this.o.width - this.cursor);\r\n            this.f[1] = (this.o.max - this.o.min) / (this.o.height - this.cursor);\r\n\r\n            if (!this.isInit) {\r\n                this._coord();\r\n            }\r\n\r\n            if(this.o.displayInput) {\r\n                var s = this;\r\n                this.$.css({\r\n                        'margin-top' : '-30px'\r\n                        , 'border' : 0\r\n                        , 'font' : '11px Arial'\r\n                        });\r\n\r\n                this.i.each(\r\n                    function (){\r\n                        $(this).css({\r\n                            'width' : (s.o.width / 4) + 'px'\r\n                            ,'border' : 0\r\n                            ,'background' : 'none'\r\n                            ,'color' : s.o.fgColor\r\n                            ,'padding' : '0px'\r\n                            ,'-webkit-appearance': 'none'\r\n                            });\r\n                    });\r\n            } else {\r\n                this.$.css({\r\n                        'width' : '0px'\r\n                        ,'visibility' : 'hidden'\r\n                        });\r\n            }\r\n        };\r\n\r\n        this.xy2val = function (x, y) {\r\n            this.m[0] = max(this.cur2, min(x - this.x, this.o.width - this.cur2));\r\n            this.m[1] = max(this.cur2, min(y - this.y, this.o.height - this.cur2));\r\n\r\n            return {\r\n                0 : ~~ (this.o.min + (this.m[0] - this.cur2) * this.f[0]),\r\n                1 : ~~ (this.o.min + (this.o.height - this.m[1] - this.cur2) * this.f[1])\r\n            };\r\n        };\r\n\r\n        this.change = function (v) {\r\n            this.cv = v;\r\n            this.i[0].val(this.cv[0]);\r\n            this.i[1].val(this.cv[1]);\r\n        };\r\n\r\n        this.val = function (v) {\r\n            if (null !== v) {\r\n                this.cv = v;\r\n                this.copy(this.cv, this.v);\r\n                this._coord();\r\n                this._draw();\r\n            } else {\r\n                return this.v;\r\n            }\r\n        };\r\n\r\n        this.cancel = function () {\r\n            this.copy(this.v, this.cv);\r\n            this.i[0].val(this.cv[0]);\r\n            this.i[1].val(this.cv[1]);\r\n            this.m[0] = this.p[0];\r\n            this.m[1] = this.p[1];\r\n            this._draw();\r\n        };\r\n\r\n        this.draw = function () {\r\n\r\n            var c = this.g\r\n                , r = 1;\r\n\r\n            if (this.o.displayPrevious) {\r\n                c.beginPath();\r\n                c.lineWidth = this.cursor;\r\n                c.strokeStyle = this.pColor;\r\n                c.moveTo(this.p[0], this.p[1] + this.cur2);\r\n                c.lineTo(this.p[0], this.p[1] - this.cur2);\r\n                c.stroke();\r\n                r = (this.cv[0] == this.v[0] && this.cv[1] == this.v[1]);\r\n            }\r\n\r\n            c.beginPath();\r\n            c.lineWidth = this.cursor;\r\n            c.strokeStyle = r  ? this.o.fgColor : this.fgColor;\r\n            c.moveTo(this.m[0], this.m[1] + this.cur2);\r\n            c.lineTo(this.m[0], this.m[1] - this.cur2);\r\n            c.stroke();\r\n        };\r\n    };\r\n\r\n    $.fn.xy = function (o) {\r\n        return this.each(\r\n            function () {\r\n                var x = new k.XY();\r\n                x.$ = $(this);\r\n                x.o = o;\r\n                x.run();\r\n            }\r\n        ).parent();\r\n    };\r\n\r\n\r\n    /**\r\n     * k.Bars\r\n     */\r\n    k.Bars = function () {\r\n        k.o.call(this);\r\n\r\n        this.bar = null;\r\n        this.mid = null;\r\n        this.col = null;\r\n        this.colWidth = null;\r\n        this.fontSize = null;\r\n        this.displayMidLine = false;\r\n\r\n        this.extend = function () {\r\n\r\n            this.o = $.extend(\r\n                {\r\n                    min : this.$.data('min') || 0,\r\n                    max : this.$.data('max') || 100,\r\n                    width : this.$.data('width') || 600,\r\n                    displayInput : this.$.data('displayinput') == null || this.$.data('displayinput'),\r\n                    height : (this.$.data('height') || 200),\r\n                    fgColor : this.$.data('fgcolor') || '#87CEEB',\r\n                    bgColor : this.$.data('bgcolor') || '#CCCCCC',\r\n                    cols : this.$.data('cols') || 8,\r\n                    spacing : this.$.data('spacing') || 1\r\n                }\r\n                ,this.o\r\n            );\r\n\r\n            // initialize colWith\r\n            (this.o.cols == 1) && (this.o.spacing = 0);\r\n            this.colWidth = (((this.o.width - this.o.spacing * this.o.cols) / this.o.cols) >> 0);\r\n\r\n            if(this.o.displayInput) {\r\n                this.fontSize = max(~~ (this.colWidth/3), 10);\r\n                this.o.height -= this.fontSize;\r\n            }\r\n        };\r\n\r\n        this.xy2val = function (x, y) {\r\n            var cw = this.colWidth + this.o.spacing\r\n                ,val = (\r\n                        max(this.o.min\r\n                        , min(this.o.max, - ( - this.mid + (y - this.y)) / this.bar))\r\n                       ) >> 0\r\n                ,ret = {};\r\n\r\n            this.col = max(0, min(this.o.cols-1, ((x - this.x) / cw) >> 0));\r\n            ret[this.col] = val;\r\n            return ret;\r\n        };\r\n\r\n        this.init = function () {\r\n\r\n            this.bar = this.o.height / (this.o.max - this.o.min);\r\n            this.mid = (this.o.max * this.bar) >> 0;\r\n            this.displayMidLine = this.o.cursor && this.o.min < 0;\r\n\r\n            if(this.o.displayInput) {\r\n                var s = this;\r\n                this.$.css({\r\n                        'margin' : '0px'\r\n                        ,'border' : 0\r\n                        ,'padding' : '0px'\r\n                        });\r\n\r\n                this.i.each(\r\n                    function (){\r\n                        $(this).css({\r\n                            'width' : (s.colWidth - 4 +  s.o.spacing) + 'px'\r\n                            ,'border' : 0\r\n                            ,'background' : 'none'\r\n                            ,'font' : s.fontSize+'px Arial' //this.fontSize\r\n                            ,'color' : s.o.fgColor\r\n                            ,'margin' : '0px'\r\n                            ,'padding' : '0px'\r\n                            ,'-webkit-appearance': 'none'\r\n                            ,'text-align' : 'center'\r\n                            });\r\n                    });\r\n            } else {\r\n                this.$.css({\r\n                        'width' : '0px'\r\n                        ,'visibility' : 'hidden'\r\n                        });\r\n            }\r\n        };\r\n\r\n        this.change = function (v) {\r\n            for (var i in v) {\r\n                this.cv[i] = v[i];\r\n                this.i[i].val(this.cv[i]);\r\n            }\r\n        };\r\n\r\n        this.val = function (v) {\r\n            if (null !== v) {\r\n                this.copy(v, this.cv);\r\n                this.copy(this.cv, this.v);\r\n\r\n                // reset cur col\r\n                this.col = null;\r\n                this._draw();\r\n            } else {\r\n                return this.v;\r\n            }\r\n        };\r\n\r\n        this.cancel = function () {\r\n            this.copy(this.v, this.cv);\r\n\r\n            // reset cur col\r\n            this.col = null;\r\n            this._draw();\r\n        };\r\n\r\n        this._bar = function (col) {\r\n\r\n            var x = (col * (this.colWidth + this.o.spacing) + this.colWidth / 2);\r\n\r\n            if (this.displayMidLine) {\r\n                this.g.beginPath();\r\n                this.g.lineWidth = this.colWidth;\r\n                this.g.strokeStyle = this.o.fgColor;\r\n                this.g.moveTo(x, this.mid);\r\n                this.g.lineTo(x, this.mid + 1);\r\n                this.g.stroke();\r\n            }\r\n\r\n            if (this.o.displayPrevious) {\r\n                this.g.beginPath();\r\n                this.g.lineWidth = this.colWidth;\r\n                this.g.strokeStyle = (this.cv[col] == this.v[col]) ? this.o.fgColor : this.pColor;\r\n                if (this.o.cursor) {\r\n                    this.g.lineTo(x, this.mid - ((this.v[col] * this.bar) >> 0) + this.o.cursor / 2);\r\n                } else {\r\n                    this.g.moveTo(x, this.mid);\r\n                }\r\n                this.g.lineTo(x, this.mid - ((this.v[col] * this.bar) >> 0) - this.o.cursor / 2);\r\n                this.g.stroke();\r\n            }\r\n\r\n            this.g.beginPath();\r\n            this.g.lineWidth = this.colWidth;\r\n            this.g.strokeStyle = this.fgColor;\r\n            if (this.o.cursor) {\r\n                this.g.lineTo(x, this.mid - ((this.cv[col] * this.bar) >> 0) + this.o.cursor / 2);\r\n            } else {\r\n                this.g.moveTo(x, this.mid);\r\n            }\r\n            this.g.lineTo(x, this.mid - ((this.cv[col] * this.bar) >> 0) - this.o.cursor / 2);\r\n            this.g.stroke();\r\n        };\r\n\r\n        this.clear = function () {\r\n            if (this.col) {\r\n                // current col\r\n                this.c.clearRect(\r\n                    this.col * (this.colWidth + this.o.spacing)\r\n                    , 0\r\n                    , this.colWidth + this.o.spacing\r\n                    , this.o.height\r\n                );\r\n            } else {\r\n                this._clear();\r\n            }\r\n        }\r\n\r\n        this.draw = function () {\r\n            if (this.col) {\r\n                this._bar(this.col);\r\n            } else {\r\n                for (var i = 0; i < this.o.cols; i++) {\r\n                    this._bar(i);\r\n                }\r\n            }\r\n        };\r\n    };\r\n\r\n    $.fn.bars = function (o) {\r\n        return this.each(\r\n            function () {\r\n                var b = new k.Bars();\r\n                b.$ = $(this);\r\n                b.o = o;\r\n                b.run();\r\n            }\r\n        ).parent();\r\n    };\r\n\t\r\n\t\r\n\t/**\r\n     * k.YSLIDER\r\n     */\r\n    k.YSLIDER = function () {\r\n        k.o.call(this);\r\n\r\n        this.m = [];\r\n        this.p = [];\r\n        this.f = []; // factor\r\n        this.s = {0:1,1:-1};\r\n        this.cur2 = 0;\r\n        this.cursor = 0;\r\n        this.v = {};\r\n        this.div = null;\r\n\r\n        this.extend = function () {\r\n            this.o = $.extend(\r\n                {\r\n                    min : this.$.data('min') || 0,\r\n                    max : this.$.data('max') || 100,\r\n                    width : this.$.data('width') || 22,\r\n                    height : this.$.data('height') || 200\r\n                }, this.o\r\n            );\r\n        };\r\n\r\n        this._coord = function() {\r\n            for(var i in this.v) {\r\n                this.m[i] = ~~ (0.5 + ((this.s[i] * this.v[i] - this.o.min) / this.f[i]) + this.cur2) ;\r\n                this.p[i] = this.m[i];\r\n            }\r\n        };\r\n\r\n        this.init = function () {\r\n            this.cursor = this.o.cursor || 30;\r\n            this.cur2 = this.cursor / 2;\r\n\r\n            this.f[0] = (this.o.max - this.o.min) / (this.o.width - this.cursor);\r\n            this.f[1] = (this.o.max - this.o.min) / (this.o.height - this.cursor);\r\n\r\n            if (!this.isInit) {\r\n                this._coord();\r\n            }\r\n\r\n            if(this.o.displayInput) {\r\n                var s = this;\r\n                this.$.css({\r\n                        'margin-top' : '-30px'\r\n                        , 'border' : 0\r\n                        , 'font' : '11px Arial'\r\n                        });\r\n\r\n                this.i.each(\r\n                    function (){\r\n                        $(this).css({\r\n                            'width' : (s.o.width / 4) + 'px'\r\n                            ,'border' : 0\r\n                            ,'background' : 'none'\r\n                            ,'color' : s.o.fgColor\r\n                            ,'padding' : '0px'\r\n                            ,'-webkit-appearance': 'none'\r\n                            });\r\n                    });\r\n            } else {\r\n                this.$.css({\r\n                        'width' : '0px'\r\n                        ,'visibility' : 'hidden'\r\n                        });\r\n            }\r\n        };\r\n\r\n        this.xy2val = function (x, y) {\r\n            this.m[0] = max(this.cur2, min(x - this.x, this.o.width - this.cur2));\r\n            this.m[1] = max(this.cur2, min(y - this.y, this.o.height - this.cur2));\r\n\r\n            return {\r\n                0 : ~~ (this.o.min + (this.m[0] - this.cur2) * this.f[0]),\r\n                1 : ~~ (this.o.min + (this.o.height - this.m[1] - this.cur2) * this.f[1])\r\n            };\r\n        };\r\n\r\n        this.change = function (v) {\r\n            this.cv = v;\r\n            this.i[0].val(this.cv[0]);\r\n            this.i[1].val(this.cv[1]);\r\n        };\r\n\r\n        this.val = function (v) {\r\n            if (null !== v) {\r\n                this.cv = v;\r\n                this.copy(this.cv, this.v);\r\n                this._coord();\r\n                this._draw();\r\n            } else {\r\n                return this.v;\r\n            }\r\n        };\r\n\r\n        this.cancel = function () {\r\n            this.copy(this.v, this.cv);\r\n            this.i[0].val(this.cv[0]);\r\n            this.i[1].val(this.cv[1]);\r\n            this.m[0] = this.p[0];\r\n            this.m[1] = this.p[1];\r\n            this._draw();\r\n        };\r\n\r\n        this.draw = function () {\r\n\r\n            var c = this.g\r\n                , r = 1;\r\n\r\n            if (this.o.displayPrevious) {\r\n                c.beginPath();\r\n                c.lineWidth = this.cursor;\r\n                c.strokeStyle = this.pColor;\r\n                c.moveTo(this.p[0], this.p[1] + this.cur2);\r\n                c.lineTo(this.p[0], this.p[1] - this.cur2);\r\n                c.stroke();\r\n                r = (this.cv[0] == this.v[0] && this.cv[1] == this.v[1]);\r\n            }\r\n\r\n            c.beginPath();\r\n            c.lineWidth = this.cursor;\r\n            c.strokeStyle = r  ? this.o.fgColor : this.fgColor;\r\n            c.moveTo(this.m[0], this.m[1] + this.cur2);\r\n            c.lineTo(this.m[0], this.m[1] - this.cur2);\r\n            c.stroke();\r\n        };\r\n    };\r\n\r\n    $.fn.kyslider = function (o) {\r\n        return this.each(\r\n            function () {\r\n                var x = new k.YSLIDER();\r\n                x.$ = $(this);\r\n                x.o = o;\r\n                x.run();\r\n            }\r\n        ).parent();\r\n    };\r\n\t\r\n\t\r\n})(jQuery);"

/***/ },

/***/ 761:
/***/ function(module, exports) {

module.exports = "/**\r\n*\r\n* jquery.sparkline.js\r\n*\r\n* v2.1.2\r\n* (c) Splunk, Inc\r\n* Contact: Gareth Watts (gareth@splunk.com)\r\n* http://omnipotent.net/jquery.sparkline/\r\n*\r\n* Generates inline sparkline charts from data supplied either to the method\r\n* or inline in HTML\r\n*\r\n* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag\r\n* (Firefox 2.0+, Safari, Opera, etc)\r\n*\r\n* License: New BSD License\r\n*\r\n* Copyright (c) 2012, Splunk Inc.\r\n* All rights reserved.\r\n*\r\n* Redistribution and use in source and binary forms, with or without modification,\r\n* are permitted provided that the following conditions are met:\r\n*\r\n*     * Redistributions of source code must retain the above copyright notice,\r\n*       this list of conditions and the following disclaimer.\r\n*     * Redistributions in binary form must reproduce the above copyright notice,\r\n*       this list of conditions and the following disclaimer in the documentation\r\n*       and/or other materials provided with the distribution.\r\n*     * Neither the name of Splunk Inc nor the names of its contributors may\r\n*       be used to endorse or promote products derived from this software without\r\n*       specific prior written permission.\r\n*\r\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY\r\n* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r\n* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\r\n* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\r\n* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r\n* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\n* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n*\r\n*\r\n* Usage:\r\n*  $(selector).sparkline(values, options)\r\n*\r\n* If values is undefined or set to 'html' then the data values are read from the specified tag:\r\n*   <p>Sparkline: <span class=\"sparkline\">1,4,6,6,8,5,3,5</span></p>\r\n*   $('.sparkline').sparkline();\r\n* There must be no spaces in the enclosed data set\r\n*\r\n* Otherwise values must be an array of numbers or null values\r\n*    <p>Sparkline: <span id=\"sparkline1\">This text replaced if the browser is compatible</span></p>\r\n*    $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])\r\n*    $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])\r\n*\r\n* Values can also be specified in an HTML comment, or as a values attribute:\r\n*    <p>Sparkline: <span class=\"sparkline\"><!--1,4,6,6,8,5,3,5 --></span></p>\r\n*    <p>Sparkline: <span class=\"sparkline\" values=\"1,4,6,6,8,5,3,5\"></span></p>\r\n*    $('.sparkline').sparkline();\r\n*\r\n* For line charts, x values can also be specified:\r\n*   <p>Sparkline: <span class=\"sparkline\">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>\r\n*    $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])\r\n*\r\n* By default, options should be passed in as teh second argument to the sparkline function:\r\n*   $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})\r\n*\r\n* Options can also be set by passing them on the tag itself.  This feature is disabled by default though\r\n* as there's a slight performance overhead:\r\n*   $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})\r\n*   <p>Sparkline: <span class=\"sparkline\" sparkType=\"bar\" sparkBarColor=\"red\">loading</span></p>\r\n* Prefix all options supplied as tag attribute with \"spark\" (configurable by setting tagOptionPrefix)\r\n*\r\n* Supported options:\r\n*   lineColor - Color of the line used for the chart\r\n*   fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart\r\n*   width - Width of the chart - Defaults to 3 times the number of values in pixels\r\n*   height - Height of the chart - Defaults to the height of the containing element\r\n*   chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied\r\n*   chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied\r\n*   chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax\r\n*   chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied\r\n*   chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied\r\n*   composite - If true then don't erase any existing chart attached to the tag, but draw\r\n*           another chart over the top - Note that width and height are ignored if an\r\n*           existing chart is detected.\r\n*   tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'\r\n*   enableTagOptions - Whether to check tags for sparkline options\r\n*   tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'\r\n*   disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a\r\n*           hidden dom element, avoding a browser reflow\r\n*   disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,\r\n*       making the plugin perform much like it did in 1.x\r\n*   disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)\r\n*   disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled\r\n*       defaults to false (highlights enabled)\r\n*   highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase\r\n*   tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body\r\n*   tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied\r\n*   tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis\r\n*   tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis\r\n*   tooltipFormatter  - Optional callback that allows you to override the HTML displayed in the tooltip\r\n*       callback is given arguments of (sparkline, options, fields)\r\n*   tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title\r\n*   tooltipFormat - A format string or SPFormat object  (or an array thereof for multiple entries)\r\n*       to control the format of the tooltip\r\n*   tooltipPrefix - A string to prepend to each field displayed in a tooltip\r\n*   tooltipSuffix - A string to append to each field displayed in a tooltip\r\n*   tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)\r\n*   tooltipValueLookups - An object or range map to map field values to tooltip strings\r\n*       (eg. to map -1 to \"Lost\", 0 to \"Draw\", and 1 to \"Win\")\r\n*   numberFormatter - Optional callback for formatting numbers in tooltips\r\n*   numberDigitGroupSep - Character to use for group separator in numbers \"1,234\" - Defaults to \",\"\r\n*   numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to \".\"\r\n*   numberDigitGroupCount - Number of digits between group separator - Defaults to 3\r\n*\r\n* There are 7 types of sparkline, selected by supplying a \"type\" option of 'line' (default),\r\n* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'\r\n*    line - Line chart.  Options:\r\n*       spotColor - Set to '' to not end each line in a circular spot\r\n*       minSpotColor - If set, color of spot at minimum value\r\n*       maxSpotColor - If set, color of spot at maximum value\r\n*       spotRadius - Radius in pixels\r\n*       lineWidth - Width of line in pixels\r\n*       normalRangeMin\r\n*       normalRangeMax - If set draws a filled horizontal bar between these two values marking the \"normal\"\r\n*                      or expected range of values\r\n*       normalRangeColor - Color to use for the above bar\r\n*       drawNormalOnTop - Draw the normal range above the chart fill color if true\r\n*       defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart\r\n*       highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable\r\n*       highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable\r\n*       valueSpots - Specify which points to draw spots on, and in which color.  Accepts a range map\r\n*\r\n*   bar - Bar chart.  Options:\r\n*       barColor - Color of bars for postive values\r\n*       negBarColor - Color of bars for negative values\r\n*       zeroColor - Color of bars with zero values\r\n*       nullColor - Color of bars with null values - Defaults to omitting the bar entirely\r\n*       barWidth - Width of bars in pixels\r\n*       colorMap - Optional mappnig of values to colors to override the *BarColor values above\r\n*                  can be an Array of values to control the color of individual bars or a range map\r\n*                  to specify colors for individual ranges of values\r\n*       barSpacing - Gap between bars in pixels\r\n*       zeroAxis - Centers the y-axis around zero if true\r\n*\r\n*   tristate - Charts values of win (>0), lose (<0) or draw (=0)\r\n*       posBarColor - Color of win values\r\n*       negBarColor - Color of lose values\r\n*       zeroBarColor - Color of draw values\r\n*       barWidth - Width of bars in pixels\r\n*       barSpacing - Gap between bars in pixels\r\n*       colorMap - Optional mappnig of values to colors to override the *BarColor values above\r\n*                  can be an Array of values to control the color of individual bars or a range map\r\n*                  to specify colors for individual ranges of values\r\n*\r\n*   discrete - Options:\r\n*       lineHeight - Height of each line in pixels - Defaults to 30% of the graph height\r\n*       thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor\r\n*       thresholdColor\r\n*\r\n*   bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...\r\n*       options:\r\n*       targetColor - The color of the vertical target marker\r\n*       targetWidth - The width of the target marker in pixels\r\n*       performanceColor - The color of the performance measure horizontal bar\r\n*       rangeColors - Colors to use for each qualitative range background color\r\n*\r\n*   pie - Pie chart. Options:\r\n*       sliceColors - An array of colors to use for pie slices\r\n*       offset - Angle in degrees to offset the first slice - Try -90 or +90\r\n*       borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)\r\n*       borderColor - Color to use for the pie chart border - Defaults to #000\r\n*\r\n*   box - Box plot. Options:\r\n*       raw - Set to true to supply pre-computed plot points as values\r\n*             values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier\r\n*             When set to false you can supply any number of values and the box plot will\r\n*             be computed for you.  Default is false.\r\n*       showOutliers - Set to true (default) to display outliers as circles\r\n*       outlierIQR - Interquartile range used to determine outliers.  Default 1.5\r\n*       boxLineColor - Outline color of the box\r\n*       boxFillColor - Fill color for the box\r\n*       whiskerColor - Line color used for whiskers\r\n*       outlierLineColor - Outline color of outlier circles\r\n*       outlierFillColor - Fill color of the outlier circles\r\n*       spotRadius - Radius of outlier circles\r\n*       medianColor - Line color of the median line\r\n*       target - Draw a target cross hair at the supplied value (default undefined)\r\n*\r\n*\r\n*\r\n*   Examples:\r\n*   $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });\r\n*   $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });\r\n*   $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):\r\n*   $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });\r\n*   $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });\r\n*   $('#pie').sparkline([1,1,2], { type:'pie' });\r\n*/\r\n\r\n/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */\r\n\r\n(function(document, Math, undefined) { // performance/minified-size optimization\r\n(function(factory) {\r\n    if(typeof define === 'function' && define.amd) {\r\n        define(['jquery'], factory);\r\n    } else if (jQuery && !jQuery.fn.sparkline) {\r\n        factory(jQuery);\r\n    }\r\n}\r\n(function($) {\r\n    'use strict';\r\n\r\n    var UNSET_OPTION = {},\r\n        getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,\r\n        remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,\r\n        MouseHandler, Tooltip, barHighlightMixin,\r\n        line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,\r\n        VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;\r\n\r\n    /**\r\n     * Default configuration settings\r\n     */\r\n    getDefaults = function () {\r\n        return {\r\n            // Settings common to most/all chart types\r\n            common: {\r\n                type: 'line',\r\n                lineColor: '#00f',\r\n                fillColor: '#cdf',\r\n                defaultPixelsPerValue: 3,\r\n                width: 'auto',\r\n                height: 'auto',\r\n                composite: false,\r\n                tagValuesAttribute: 'values',\r\n                tagOptionsPrefix: 'spark',\r\n                enableTagOptions: false,\r\n                enableHighlight: true,\r\n                highlightLighten: 1.4,\r\n                tooltipSkipNull: true,\r\n                tooltipPrefix: '',\r\n                tooltipSuffix: '',\r\n                disableHiddenCheck: false,\r\n                numberFormatter: false,\r\n                numberDigitGroupCount: 3,\r\n                numberDigitGroupSep: ',',\r\n                numberDecimalMark: '.',\r\n                disableTooltips: false,\r\n                disableInteraction: false\r\n            },\r\n            // Defaults for line charts\r\n            line: {\r\n                spotColor: '#f80',\r\n                highlightSpotColor: '#5f5',\r\n                highlightLineColor: '#f22',\r\n                spotRadius: 1.5,\r\n                minSpotColor: '#f80',\r\n                maxSpotColor: '#f80',\r\n                lineWidth: 1,\r\n                normalRangeMin: undefined,\r\n                normalRangeMax: undefined,\r\n                normalRangeColor: '#ccc',\r\n                drawNormalOnTop: false,\r\n                chartRangeMin: undefined,\r\n                chartRangeMax: undefined,\r\n                chartRangeMinX: undefined,\r\n                chartRangeMaxX: undefined,\r\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{prefix}}{{y}}{{suffix}}')\r\n            },\r\n            // Defaults for bar charts\r\n            bar: {\r\n                barColor: '#3366cc',\r\n                negBarColor: '#f44',\r\n                stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',\r\n                    '#dd4477', '#0099c6', '#990099'],\r\n                zeroColor: undefined,\r\n                nullColor: undefined,\r\n                zeroAxis: true,\r\n                barWidth: 4,\r\n                barSpacing: 1,\r\n                chartRangeMax: undefined,\r\n                chartRangeMin: undefined,\r\n                chartRangeClip: false,\r\n                colorMap: undefined,\r\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{prefix}}{{value}}{{suffix}}')\r\n            },\r\n            // Defaults for tristate charts\r\n            tristate: {\r\n                barWidth: 4,\r\n                barSpacing: 1,\r\n                posBarColor: '#6f6',\r\n                negBarColor: '#f44',\r\n                zeroBarColor: '#999',\r\n                colorMap: {},\r\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{value:map}}'),\r\n                tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }\r\n            },\r\n            // Defaults for discrete charts\r\n            discrete: {\r\n                lineHeight: 'auto',\r\n                thresholdColor: undefined,\r\n                thresholdValue: 0,\r\n                chartRangeMax: undefined,\r\n                chartRangeMin: undefined,\r\n                chartRangeClip: false,\r\n                tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')\r\n            },\r\n            // Defaults for bullet charts\r\n            bullet: {\r\n                targetColor: '#f33',\r\n                targetWidth: 3, // width of the target bar in pixels\r\n                performanceColor: '#33f',\r\n                rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],\r\n                base: undefined, // set this to a number to change the base start number\r\n                tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),\r\n                tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }\r\n            },\r\n            // Defaults for pie charts\r\n            pie: {\r\n                offset: 0,\r\n                sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',\r\n                    '#dd4477', '#0099c6', '#990099'],\r\n                borderWidth: 0,\r\n                borderColor: '#000',\r\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{value}} ({{percent.1}}%)')\r\n            },\r\n            // Defaults for box plots\r\n            box: {\r\n                raw: false,\r\n                boxLineColor: '#000',\r\n                boxFillColor: '#cdf',\r\n                whiskerColor: '#000',\r\n                outlierLineColor: '#333',\r\n                outlierFillColor: '#fff',\r\n                medianColor: '#f00',\r\n                showOutliers: true,\r\n                outlierIQR: 1.5,\r\n                spotRadius: 1.5,\r\n                target: undefined,\r\n                targetColor: '#4a2',\r\n                chartRangeMax: undefined,\r\n                chartRangeMin: undefined,\r\n                tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),\r\n                tooltipFormatFieldlistKey: 'field',\r\n                tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',\r\n                    uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',\r\n                    lw: 'Left Whisker', rw: 'Right Whisker'} }\r\n            }\r\n        };\r\n    };\r\n\r\n    // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname\r\n    defaultStyles = '.jqstooltip { ' +\r\n            'position: absolute;' +\r\n            'left: 0px;' +\r\n            'top: 0px;' +\r\n            'visibility: hidden;' +\r\n            'background: rgb(0, 0, 0) transparent;' +\r\n            'background-color: rgba(0,0,0,0.6);' +\r\n            'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +\r\n            '-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)\";' +\r\n            'color: white;' +\r\n            'font: 10px arial, san serif;' +\r\n            'text-align: left;' +\r\n            'white-space: nowrap;' +\r\n            'padding: 5px;' +\r\n            'border: 1px solid white;' +\r\n            'z-index: 10000;' +\r\n            '}' +\r\n            '.jqsfield { ' +\r\n            'color: white;' +\r\n            'font: 10px arial, san serif;' +\r\n            'text-align: left;' +\r\n            '}';\r\n\r\n    /**\r\n     * Utilities\r\n     */\r\n\r\n    createClass = function (/* [baseclass, [mixin, ...]], definition */) {\r\n        var Class, args;\r\n        Class = function () {\r\n            this.init.apply(this, arguments);\r\n        };\r\n        if (arguments.length > 1) {\r\n            if (arguments[0]) {\r\n                Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);\r\n                Class._super = arguments[0].prototype;\r\n            } else {\r\n                Class.prototype = arguments[arguments.length - 1];\r\n            }\r\n            if (arguments.length > 2) {\r\n                args = Array.prototype.slice.call(arguments, 1, -1);\r\n                args.unshift(Class.prototype);\r\n                $.extend.apply($, args);\r\n            }\r\n        } else {\r\n            Class.prototype = arguments[0];\r\n        }\r\n        Class.prototype.cls = Class;\r\n        return Class;\r\n    };\r\n\r\n    /**\r\n     * Wraps a format string for tooltips\r\n     * {{x}}\r\n     * {{x.2}\r\n     * {{x:months}}\r\n     */\r\n    $.SPFormatClass = SPFormat = createClass({\r\n        fre: /\\{\\{([\\w.]+?)(:(.+?))?\\}\\}/g,\r\n        precre: /(\\w+)\\.(\\d+)/,\r\n\r\n        init: function (format, fclass) {\r\n            this.format = format;\r\n            this.fclass = fclass;\r\n        },\r\n\r\n        render: function (fieldset, lookups, options) {\r\n            var self = this,\r\n                fields = fieldset,\r\n                match, token, lookupkey, fieldvalue, prec;\r\n            return this.format.replace(this.fre, function () {\r\n                var lookup;\r\n                token = arguments[1];\r\n                lookupkey = arguments[3];\r\n                match = self.precre.exec(token);\r\n                if (match) {\r\n                    prec = match[2];\r\n                    token = match[1];\r\n                } else {\r\n                    prec = false;\r\n                }\r\n                fieldvalue = fields[token];\r\n                if (fieldvalue === undefined) {\r\n                    return '';\r\n                }\r\n                if (lookupkey && lookups && lookups[lookupkey]) {\r\n                    lookup = lookups[lookupkey];\r\n                    if (lookup.get) { // RangeMap\r\n                        return lookups[lookupkey].get(fieldvalue) || fieldvalue;\r\n                    } else {\r\n                        return lookups[lookupkey][fieldvalue] || fieldvalue;\r\n                    }\r\n                }\r\n                if (isNumber(fieldvalue)) {\r\n                    if (options.get('numberFormatter')) {\r\n                        fieldvalue = options.get('numberFormatter')(fieldvalue);\r\n                    } else {\r\n                        fieldvalue = formatNumber(fieldvalue, prec,\r\n                            options.get('numberDigitGroupCount'),\r\n                            options.get('numberDigitGroupSep'),\r\n                            options.get('numberDecimalMark'));\r\n                    }\r\n                }\r\n                return fieldvalue;\r\n            });\r\n        }\r\n    });\r\n\r\n    // convience method to avoid needing the new operator\r\n    $.spformat = function(format, fclass) {\r\n        return new SPFormat(format, fclass);\r\n    };\r\n\r\n    clipval = function (val, min, max) {\r\n        if (val < min) {\r\n            return min;\r\n        }\r\n        if (val > max) {\r\n            return max;\r\n        }\r\n        return val;\r\n    };\r\n\r\n    quartile = function (values, q) {\r\n        var vl;\r\n        if (q === 2) {\r\n            vl = Math.floor(values.length / 2);\r\n            return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2;\r\n        } else {\r\n            if (values.length % 2 ) { // odd\r\n                vl = (values.length * q + q) / 4;\r\n                return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];\r\n            } else { //even\r\n                vl = (values.length * q + 2) / 4;\r\n                return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 :  values[vl-1];\r\n\r\n            }\r\n        }\r\n    };\r\n\r\n    normalizeValue = function (val) {\r\n        var nf;\r\n        switch (val) {\r\n            case 'undefined':\r\n                val = undefined;\r\n                break;\r\n            case 'null':\r\n                val = null;\r\n                break;\r\n            case 'true':\r\n                val = true;\r\n                break;\r\n            case 'false':\r\n                val = false;\r\n                break;\r\n            default:\r\n                nf = parseFloat(val);\r\n                if (val == nf) {\r\n                    val = nf;\r\n                }\r\n        }\r\n        return val;\r\n    };\r\n\r\n    normalizeValues = function (vals) {\r\n        var i, result = [];\r\n        for (i = vals.length; i--;) {\r\n            result[i] = normalizeValue(vals[i]);\r\n        }\r\n        return result;\r\n    };\r\n\r\n    remove = function (vals, filter) {\r\n        var i, vl, result = [];\r\n        for (i = 0, vl = vals.length; i < vl; i++) {\r\n            if (vals[i] !== filter) {\r\n                result.push(vals[i]);\r\n            }\r\n        }\r\n        return result;\r\n    };\r\n\r\n    isNumber = function (num) {\r\n        return !isNaN(parseFloat(num)) && isFinite(num);\r\n    };\r\n\r\n    formatNumber = function (num, prec, groupsize, groupsep, decsep) {\r\n        var p, i;\r\n        num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');\r\n        p = (p = $.inArray('.', num)) < 0 ? num.length : p;\r\n        if (p < num.length) {\r\n            num[p] = decsep;\r\n        }\r\n        for (i = p - groupsize; i > 0; i -= groupsize) {\r\n            num.splice(i, 0, groupsep);\r\n        }\r\n        return num.join('');\r\n    };\r\n\r\n    // determine if all values of an array match a value\r\n    // returns true if the array is empty\r\n    all = function (val, arr, ignoreNull) {\r\n        var i;\r\n        for (i = arr.length; i--; ) {\r\n            if (ignoreNull && arr[i] === null) continue;\r\n            if (arr[i] !== val) {\r\n                return false;\r\n            }\r\n        }\r\n        return true;\r\n    };\r\n\r\n    // sums the numeric values in an array, ignoring other values\r\n    sum = function (vals) {\r\n        var total = 0, i;\r\n        for (i = vals.length; i--;) {\r\n            total += typeof vals[i] === 'number' ? vals[i] : 0;\r\n        }\r\n        return total;\r\n    };\r\n\r\n    ensureArray = function (val) {\r\n        return $.isArray(val) ? val : [val];\r\n    };\r\n\r\n    // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/\r\n    addCSS = function(css) {\r\n        var tag;\r\n        //if ('\\v' == 'v') /* ie only */ {\r\n        if (document.createStyleSheet) {\r\n            document.createStyleSheet().cssText = css;\r\n        } else {\r\n            tag = document.createElement('style');\r\n            tag.type = 'text/css';\r\n            document.getElementsByTagName('head')[0].appendChild(tag);\r\n            tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;\r\n        }\r\n    };\r\n\r\n    // Provide a cross-browser interface to a few simple drawing primitives\r\n    $.fn.simpledraw = function (width, height, useExisting, interact) {\r\n        var target, mhandler;\r\n        if (useExisting && (target = this.data('_jqs_vcanvas'))) {\r\n            return target;\r\n        }\r\n\r\n        if ($.fn.sparkline.canvas === false) {\r\n            // We've already determined that neither Canvas nor VML are available\r\n            return false;\r\n\r\n        } else if ($.fn.sparkline.canvas === undefined) {\r\n            // No function defined yet -- need to see if we support Canvas or VML\r\n            var el = document.createElement('canvas');\r\n            if (!!(el.getContext && el.getContext('2d'))) {\r\n                // Canvas is available\r\n                $.fn.sparkline.canvas = function(width, height, target, interact) {\r\n                    return new VCanvas_canvas(width, height, target, interact);\r\n                };\r\n            } else if (document.namespaces && !document.namespaces.v) {\r\n                // VML is available\r\n                document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');\r\n                $.fn.sparkline.canvas = function(width, height, target, interact) {\r\n                    return new VCanvas_vml(width, height, target);\r\n                };\r\n            } else {\r\n                // Neither Canvas nor VML are available\r\n                $.fn.sparkline.canvas = false;\r\n                return false;\r\n            }\r\n        }\r\n\r\n        if (width === undefined) {\r\n            width = $(this).innerWidth();\r\n        }\r\n        if (height === undefined) {\r\n            height = $(this).innerHeight();\r\n        }\r\n\r\n        target = $.fn.sparkline.canvas(width, height, this, interact);\r\n\r\n        mhandler = $(this).data('_jqs_mhandler');\r\n        if (mhandler) {\r\n            mhandler.registerCanvas(target);\r\n        }\r\n        return target;\r\n    };\r\n\r\n    $.fn.cleardraw = function () {\r\n        var target = this.data('_jqs_vcanvas');\r\n        if (target) {\r\n            target.reset();\r\n        }\r\n    };\r\n\r\n    $.RangeMapClass = RangeMap = createClass({\r\n        init: function (map) {\r\n            var key, range, rangelist = [];\r\n            for (key in map) {\r\n                if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {\r\n                    range = key.split(':');\r\n                    range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);\r\n                    range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);\r\n                    range[2] = map[key];\r\n                    rangelist.push(range);\r\n                }\r\n            }\r\n            this.map = map;\r\n            this.rangelist = rangelist || false;\r\n        },\r\n\r\n        get: function (value) {\r\n            var rangelist = this.rangelist,\r\n                i, range, result;\r\n            if ((result = this.map[value]) !== undefined) {\r\n                return result;\r\n            }\r\n            if (rangelist) {\r\n                for (i = rangelist.length; i--;) {\r\n                    range = rangelist[i];\r\n                    if (range[0] <= value && range[1] >= value) {\r\n                        return range[2];\r\n                    }\r\n                }\r\n            }\r\n            return undefined;\r\n        }\r\n    });\r\n\r\n    // Convenience function\r\n    $.range_map = function(map) {\r\n        return new RangeMap(map);\r\n    };\r\n\r\n    MouseHandler = createClass({\r\n        init: function (el, options) {\r\n            var $el = $(el);\r\n            this.$el = $el;\r\n            this.options = options;\r\n            this.currentPageX = 0;\r\n            this.currentPageY = 0;\r\n            this.el = el;\r\n            this.splist = [];\r\n            this.tooltip = null;\r\n            this.over = false;\r\n            this.displayTooltips = !options.get('disableTooltips');\r\n            this.highlightEnabled = !options.get('disableHighlight');\r\n        },\r\n\r\n        registerSparkline: function (sp) {\r\n            this.splist.push(sp);\r\n            if (this.over) {\r\n                this.updateDisplay();\r\n            }\r\n        },\r\n\r\n        registerCanvas: function (canvas) {\r\n            var $canvas = $(canvas.canvas);\r\n            this.canvas = canvas;\r\n            this.$canvas = $canvas;\r\n            $canvas.mouseenter($.proxy(this.mouseenter, this));\r\n            $canvas.mouseleave($.proxy(this.mouseleave, this));\r\n            $canvas.click($.proxy(this.mouseclick, this));\r\n        },\r\n\r\n        reset: function (removeTooltip) {\r\n            this.splist = [];\r\n            if (this.tooltip && removeTooltip) {\r\n                this.tooltip.remove();\r\n                this.tooltip = undefined;\r\n            }\r\n        },\r\n\r\n        mouseclick: function (e) {\r\n            var clickEvent = $.Event('sparklineClick');\r\n            clickEvent.originalEvent = e;\r\n            clickEvent.sparklines = this.splist;\r\n            this.$el.trigger(clickEvent);\r\n        },\r\n\r\n        mouseenter: function (e) {\r\n            $(document.body).unbind('mousemove.jqs');\r\n            $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));\r\n            this.over = true;\r\n            this.currentPageX = e.pageX;\r\n            this.currentPageY = e.pageY;\r\n            this.currentEl = e.target;\r\n            if (!this.tooltip && this.displayTooltips) {\r\n                this.tooltip = new Tooltip(this.options);\r\n                this.tooltip.updatePosition(e.pageX, e.pageY);\r\n            }\r\n            this.updateDisplay();\r\n        },\r\n\r\n        mouseleave: function () {\r\n            $(document.body).unbind('mousemove.jqs');\r\n            var splist = this.splist,\r\n                 spcount = splist.length,\r\n                 needsRefresh = false,\r\n                 sp, i;\r\n            this.over = false;\r\n            this.currentEl = null;\r\n\r\n            if (this.tooltip) {\r\n                this.tooltip.remove();\r\n                this.tooltip = null;\r\n            }\r\n\r\n            for (i = 0; i < spcount; i++) {\r\n                sp = splist[i];\r\n                if (sp.clearRegionHighlight()) {\r\n                    needsRefresh = true;\r\n                }\r\n            }\r\n\r\n            if (needsRefresh) {\r\n                this.canvas.render();\r\n            }\r\n        },\r\n\r\n        mousemove: function (e) {\r\n            this.currentPageX = e.pageX;\r\n            this.currentPageY = e.pageY;\r\n            this.currentEl = e.target;\r\n            if (this.tooltip) {\r\n                this.tooltip.updatePosition(e.pageX, e.pageY);\r\n            }\r\n            this.updateDisplay();\r\n        },\r\n\r\n        updateDisplay: function () {\r\n            var splist = this.splist,\r\n                 spcount = splist.length,\r\n                 needsRefresh = false,\r\n                 offset = this.$canvas.offset(),\r\n                 localX = this.currentPageX - offset.left,\r\n                 localY = this.currentPageY - offset.top,\r\n                 tooltiphtml, sp, i, result, changeEvent;\r\n            if (!this.over) {\r\n                return;\r\n            }\r\n            for (i = 0; i < spcount; i++) {\r\n                sp = splist[i];\r\n                result = sp.setRegionHighlight(this.currentEl, localX, localY);\r\n                if (result) {\r\n                    needsRefresh = true;\r\n                }\r\n            }\r\n            if (needsRefresh) {\r\n                changeEvent = $.Event('sparklineRegionChange');\r\n                changeEvent.sparklines = this.splist;\r\n                this.$el.trigger(changeEvent);\r\n                if (this.tooltip) {\r\n                    tooltiphtml = '';\r\n                    for (i = 0; i < spcount; i++) {\r\n                        sp = splist[i];\r\n                        tooltiphtml += sp.getCurrentRegionTooltip();\r\n                    }\r\n                    this.tooltip.setContent(tooltiphtml);\r\n                }\r\n                if (!this.disableHighlight) {\r\n                    this.canvas.render();\r\n                }\r\n            }\r\n            if (result === null) {\r\n                this.mouseleave();\r\n            }\r\n        }\r\n    });\r\n\r\n\r\n    Tooltip = createClass({\r\n        sizeStyle: 'position: static !important;' +\r\n            'display: block !important;' +\r\n            'visibility: hidden !important;' +\r\n            'float: left !important;',\r\n\r\n        init: function (options) {\r\n            var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),\r\n                sizetipStyle = this.sizeStyle,\r\n                offset;\r\n            this.container = options.get('tooltipContainer') || document.body;\r\n            this.tooltipOffsetX = options.get('tooltipOffsetX', 10);\r\n            this.tooltipOffsetY = options.get('tooltipOffsetY', 12);\r\n            // remove any previous lingering tooltip\r\n            $('#jqssizetip').remove();\r\n            $('#jqstooltip').remove();\r\n            this.sizetip = $('<div/>', {\r\n                id: 'jqssizetip',\r\n                style: sizetipStyle,\r\n                'class': tooltipClassname\r\n            });\r\n            this.tooltip = $('<div/>', {\r\n                id: 'jqstooltip',\r\n                'class': tooltipClassname\r\n            }).appendTo(this.container);\r\n            // account for the container's location\r\n            offset = this.tooltip.offset();\r\n            this.offsetLeft = offset.left;\r\n            this.offsetTop = offset.top;\r\n            this.hidden = true;\r\n            $(window).unbind('resize.jqs scroll.jqs');\r\n            $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));\r\n            this.updateWindowDims();\r\n        },\r\n\r\n        updateWindowDims: function () {\r\n            this.scrollTop = $(window).scrollTop();\r\n            this.scrollLeft = $(window).scrollLeft();\r\n            this.scrollRight = this.scrollLeft + $(window).width();\r\n            this.updatePosition();\r\n        },\r\n\r\n        getSize: function (content) {\r\n            this.sizetip.html(content).appendTo(this.container);\r\n            this.width = this.sizetip.width() + 1;\r\n            this.height = this.sizetip.height();\r\n            this.sizetip.remove();\r\n        },\r\n\r\n        setContent: function (content) {\r\n            if (!content) {\r\n                this.tooltip.css('visibility', 'hidden');\r\n                this.hidden = true;\r\n                return;\r\n            }\r\n            this.getSize(content);\r\n            this.tooltip.html(content)\r\n                .css({\r\n                    'width': this.width,\r\n                    'height': this.height,\r\n                    'visibility': 'visible'\r\n                });\r\n            if (this.hidden) {\r\n                this.hidden = false;\r\n                this.updatePosition();\r\n            }\r\n        },\r\n\r\n        updatePosition: function (x, y) {\r\n            if (x === undefined) {\r\n                if (this.mousex === undefined) {\r\n                    return;\r\n                }\r\n                x = this.mousex - this.offsetLeft;\r\n                y = this.mousey - this.offsetTop;\r\n\r\n            } else {\r\n                this.mousex = x = x - this.offsetLeft;\r\n                this.mousey = y = y - this.offsetTop;\r\n            }\r\n            if (!this.height || !this.width || this.hidden) {\r\n                return;\r\n            }\r\n\r\n            y -= this.height + this.tooltipOffsetY;\r\n            x += this.tooltipOffsetX;\r\n\r\n            if (y < this.scrollTop) {\r\n                y = this.scrollTop;\r\n            }\r\n            if (x < this.scrollLeft) {\r\n                x = this.scrollLeft;\r\n            } else if (x + this.width > this.scrollRight) {\r\n                x = this.scrollRight - this.width;\r\n            }\r\n\r\n            this.tooltip.css({\r\n                'left': x,\r\n                'top': y\r\n            });\r\n        },\r\n\r\n        remove: function () {\r\n            this.tooltip.remove();\r\n            this.sizetip.remove();\r\n            this.sizetip = this.tooltip = undefined;\r\n            $(window).unbind('resize.jqs scroll.jqs');\r\n        }\r\n    });\r\n\r\n    initStyles = function() {\r\n        addCSS(defaultStyles);\r\n    };\r\n\r\n    $(initStyles);\r\n\r\n    pending = [];\r\n    $.fn.sparkline = function (userValues, userOptions) {\r\n        return this.each(function () {\r\n            var options = new $.fn.sparkline.options(this, userOptions),\r\n                 $this = $(this),\r\n                 render, i;\r\n            render = function () {\r\n                var values, width, height, tmp, mhandler, sp, vals;\r\n                if (userValues === 'html' || userValues === undefined) {\r\n                    vals = this.getAttribute(options.get('tagValuesAttribute'));\r\n                    if (vals === undefined || vals === null) {\r\n                        vals = $this.html();\r\n                    }\r\n                    values = vals.replace(/(^\\s*<!--)|(-->\\s*$)|\\s+/g, '').split(',');\r\n                } else {\r\n                    values = userValues;\r\n                }\r\n\r\n                width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');\r\n                if (options.get('height') === 'auto') {\r\n                    if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {\r\n                        // must be a better way to get the line height\r\n                        tmp = document.createElement('span');\r\n                        tmp.innerHTML = 'a';\r\n                        $this.html(tmp);\r\n                        height = $(tmp).innerHeight() || $(tmp).height();\r\n                        $(tmp).remove();\r\n                        tmp = null;\r\n                    }\r\n                } else {\r\n                    height = options.get('height');\r\n                }\r\n\r\n                if (!options.get('disableInteraction')) {\r\n                    mhandler = $.data(this, '_jqs_mhandler');\r\n                    if (!mhandler) {\r\n                        mhandler = new MouseHandler(this, options);\r\n                        $.data(this, '_jqs_mhandler', mhandler);\r\n                    } else if (!options.get('composite')) {\r\n                        mhandler.reset();\r\n                    }\r\n                } else {\r\n                    mhandler = false;\r\n                }\r\n\r\n                if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {\r\n                    if (!$.data(this, '_jqs_errnotify')) {\r\n                        alert('Attempted to attach a composite sparkline to an element with no existing sparkline');\r\n                        $.data(this, '_jqs_errnotify', true);\r\n                    }\r\n                    return;\r\n                }\r\n\r\n                sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);\r\n\r\n                sp.render();\r\n\r\n                if (mhandler) {\r\n                    mhandler.registerSparkline(sp);\r\n                }\r\n            };\r\n            if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || !$(this).parents('body').length) {\r\n                if (!options.get('composite') && $.data(this, '_jqs_pending')) {\r\n                    // remove any existing references to the element\r\n                    for (i = pending.length; i; i--) {\r\n                        if (pending[i - 1][0] == this) {\r\n                            pending.splice(i - 1, 1);\r\n                        }\r\n                    }\r\n                }\r\n                pending.push([this, render]);\r\n                $.data(this, '_jqs_pending', true);\r\n            } else {\r\n                render.call(this);\r\n            }\r\n        });\r\n    };\r\n\r\n    $.fn.sparkline.defaults = getDefaults();\r\n\r\n\r\n    $.sparkline_display_visible = function () {\r\n        var el, i, pl;\r\n        var done = [];\r\n        for (i = 0, pl = pending.length; i < pl; i++) {\r\n            el = pending[i][0];\r\n            if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {\r\n                pending[i][1].call(el);\r\n                $.data(pending[i][0], '_jqs_pending', false);\r\n                done.push(i);\r\n            } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {\r\n                // element has been inserted and removed from the DOM\r\n                // If it was not yet inserted into the dom then the .data request\r\n                // will return true.\r\n                // removing from the dom causes the data to be removed.\r\n                $.data(pending[i][0], '_jqs_pending', false);\r\n                done.push(i);\r\n            }\r\n        }\r\n        for (i = done.length; i; i--) {\r\n            pending.splice(done[i - 1], 1);\r\n        }\r\n    };\r\n\r\n\r\n    /**\r\n     * User option handler\r\n     */\r\n    $.fn.sparkline.options = createClass({\r\n        init: function (tag, userOptions) {\r\n            var extendedOptions, defaults, base, tagOptionType;\r\n            this.userOptions = userOptions = userOptions || {};\r\n            this.tag = tag;\r\n            this.tagValCache = {};\r\n            defaults = $.fn.sparkline.defaults;\r\n            base = defaults.common;\r\n            this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);\r\n\r\n            tagOptionType = this.getTagSetting('type');\r\n            if (tagOptionType === UNSET_OPTION) {\r\n                extendedOptions = defaults[userOptions.type || base.type];\r\n            } else {\r\n                extendedOptions = defaults[tagOptionType];\r\n            }\r\n            this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);\r\n        },\r\n\r\n\r\n        getTagSetting: function (key) {\r\n            var prefix = this.tagOptionsPrefix,\r\n                val, i, pairs, keyval;\r\n            if (prefix === false || prefix === undefined) {\r\n                return UNSET_OPTION;\r\n            }\r\n            if (this.tagValCache.hasOwnProperty(key)) {\r\n                val = this.tagValCache.key;\r\n            } else {\r\n                val = this.tag.getAttribute(prefix + key);\r\n                if (val === undefined || val === null) {\r\n                    val = UNSET_OPTION;\r\n                } else if (val.substr(0, 1) === '[') {\r\n                    val = val.substr(1, val.length - 2).split(',');\r\n                    for (i = val.length; i--;) {\r\n                        val[i] = normalizeValue(val[i].replace(/(^\\s*)|(\\s*$)/g, ''));\r\n                    }\r\n                } else if (val.substr(0, 1) === '{') {\r\n                    pairs = val.substr(1, val.length - 2).split(',');\r\n                    val = {};\r\n                    for (i = pairs.length; i--;) {\r\n                        keyval = pairs[i].split(':', 2);\r\n                        val[keyval[0].replace(/(^\\s*)|(\\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\\s*)|(\\s*$)/g, ''));\r\n                    }\r\n                } else {\r\n                    val = normalizeValue(val);\r\n                }\r\n                this.tagValCache.key = val;\r\n            }\r\n            return val;\r\n        },\r\n\r\n        get: function (key, defaultval) {\r\n            var tagOption = this.getTagSetting(key),\r\n                result;\r\n            if (tagOption !== UNSET_OPTION) {\r\n                return tagOption;\r\n            }\r\n            return (result = this.mergedOptions[key]) === undefined ? defaultval : result;\r\n        }\r\n    });\r\n\r\n\r\n    $.fn.sparkline._base = createClass({\r\n        disabled: false,\r\n\r\n        init: function (el, values, options, width, height) {\r\n            this.el = el;\r\n            this.$el = $(el);\r\n            this.values = values;\r\n            this.options = options;\r\n            this.width = width;\r\n            this.height = height;\r\n            this.currentRegion = undefined;\r\n        },\r\n\r\n        /**\r\n         * Setup the canvas\r\n         */\r\n        initTarget: function () {\r\n            var interactive = !this.options.get('disableInteraction');\r\n            if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {\r\n                this.disabled = true;\r\n            } else {\r\n                this.canvasWidth = this.target.pixelWidth;\r\n                this.canvasHeight = this.target.pixelHeight;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Actually render the chart to the canvas\r\n         */\r\n        render: function () {\r\n            if (this.disabled) {\r\n                this.el.innerHTML = '';\r\n                return false;\r\n            }\r\n            return true;\r\n        },\r\n\r\n        /**\r\n         * Return a region id for a given x/y co-ordinate\r\n         */\r\n        getRegion: function (x, y) {\r\n        },\r\n\r\n        /**\r\n         * Highlight an item based on the moused-over x,y co-ordinate\r\n         */\r\n        setRegionHighlight: function (el, x, y) {\r\n            var currentRegion = this.currentRegion,\r\n                highlightEnabled = !this.options.get('disableHighlight'),\r\n                newRegion;\r\n            if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {\r\n                return null;\r\n            }\r\n            newRegion = this.getRegion(el, x, y);\r\n            if (currentRegion !== newRegion) {\r\n                if (currentRegion !== undefined && highlightEnabled) {\r\n                    this.removeHighlight();\r\n                }\r\n                this.currentRegion = newRegion;\r\n                if (newRegion !== undefined && highlightEnabled) {\r\n                    this.renderHighlight();\r\n                }\r\n                return true;\r\n            }\r\n            return false;\r\n        },\r\n\r\n        /**\r\n         * Reset any currently highlighted item\r\n         */\r\n        clearRegionHighlight: function () {\r\n            if (this.currentRegion !== undefined) {\r\n                this.removeHighlight();\r\n                this.currentRegion = undefined;\r\n                return true;\r\n            }\r\n            return false;\r\n        },\r\n\r\n        renderHighlight: function () {\r\n            this.changeHighlight(true);\r\n        },\r\n\r\n        removeHighlight: function () {\r\n            this.changeHighlight(false);\r\n        },\r\n\r\n        changeHighlight: function (highlight)  {},\r\n\r\n        /**\r\n         * Fetch the HTML to display as a tooltip\r\n         */\r\n        getCurrentRegionTooltip: function () {\r\n            var options = this.options,\r\n                header = '',\r\n                entries = [],\r\n                fields, formats, formatlen, fclass, text, i,\r\n                showFields, showFieldsKey, newFields, fv,\r\n                formatter, format, fieldlen, j;\r\n            if (this.currentRegion === undefined) {\r\n                return '';\r\n            }\r\n            fields = this.getCurrentRegionFields();\r\n            formatter = options.get('tooltipFormatter');\r\n            if (formatter) {\r\n                return formatter(this, options, fields);\r\n            }\r\n            if (options.get('tooltipChartTitle')) {\r\n                header += '<div class=\"jqs jqstitle\">' + options.get('tooltipChartTitle') + '</div>\\n';\r\n            }\r\n            formats = this.options.get('tooltipFormat');\r\n            if (!formats) {\r\n                return '';\r\n            }\r\n            if (!$.isArray(formats)) {\r\n                formats = [formats];\r\n            }\r\n            if (!$.isArray(fields)) {\r\n                fields = [fields];\r\n            }\r\n            showFields = this.options.get('tooltipFormatFieldlist');\r\n            showFieldsKey = this.options.get('tooltipFormatFieldlistKey');\r\n            if (showFields && showFieldsKey) {\r\n                // user-selected ordering of fields\r\n                newFields = [];\r\n                for (i = fields.length; i--;) {\r\n                    fv = fields[i][showFieldsKey];\r\n                    if ((j = $.inArray(fv, showFields)) != -1) {\r\n                        newFields[j] = fields[i];\r\n                    }\r\n                }\r\n                fields = newFields;\r\n            }\r\n            formatlen = formats.length;\r\n            fieldlen = fields.length;\r\n            for (i = 0; i < formatlen; i++) {\r\n                format = formats[i];\r\n                if (typeof format === 'string') {\r\n                    format = new SPFormat(format);\r\n                }\r\n                fclass = format.fclass || 'jqsfield';\r\n                for (j = 0; j < fieldlen; j++) {\r\n                    if (!fields[j].isNull || !options.get('tooltipSkipNull')) {\r\n                        $.extend(fields[j], {\r\n                            prefix: options.get('tooltipPrefix'),\r\n                            suffix: options.get('tooltipSuffix')\r\n                        });\r\n                        text = format.render(fields[j], options.get('tooltipValueLookups'), options);\r\n                        entries.push('<div class=\"' + fclass + '\">' + text + '</div>');\r\n                    }\r\n                }\r\n            }\r\n            if (entries.length) {\r\n                return header + entries.join('\\n');\r\n            }\r\n            return '';\r\n        },\r\n\r\n        getCurrentRegionFields: function () {},\r\n\r\n        calcHighlightColor: function (color, options) {\r\n            var highlightColor = options.get('highlightColor'),\r\n                lighten = options.get('highlightLighten'),\r\n                parse, mult, rgbnew, i;\r\n            if (highlightColor) {\r\n                return highlightColor;\r\n            }\r\n            if (lighten) {\r\n                // extract RGB values\r\n                parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);\r\n                if (parse) {\r\n                    rgbnew = [];\r\n                    mult = color.length === 4 ? 16 : 1;\r\n                    for (i = 0; i < 3; i++) {\r\n                        rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);\r\n                    }\r\n                    return 'rgb(' + rgbnew.join(',') + ')';\r\n                }\r\n\r\n            }\r\n            return color;\r\n        }\r\n\r\n    });\r\n\r\n    barHighlightMixin = {\r\n        changeHighlight: function (highlight) {\r\n            var currentRegion = this.currentRegion,\r\n                target = this.target,\r\n                shapeids = this.regionShapes[currentRegion],\r\n                newShapes;\r\n            // will be null if the region value was null\r\n            if (shapeids) {\r\n                newShapes = this.renderRegion(currentRegion, highlight);\r\n                if ($.isArray(newShapes) || $.isArray(shapeids)) {\r\n                    target.replaceWithShapes(shapeids, newShapes);\r\n                    this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {\r\n                        return newShape.id;\r\n                    });\r\n                } else {\r\n                    target.replaceWithShape(shapeids, newShapes);\r\n                    this.regionShapes[currentRegion] = newShapes.id;\r\n                }\r\n            }\r\n        },\r\n\r\n        render: function () {\r\n            var values = this.values,\r\n                target = this.target,\r\n                regionShapes = this.regionShapes,\r\n                shapes, ids, i, j;\r\n\r\n            if (!this.cls._super.render.call(this)) {\r\n                return;\r\n            }\r\n            for (i = values.length; i--;) {\r\n                shapes = this.renderRegion(i);\r\n                if (shapes) {\r\n                    if ($.isArray(shapes)) {\r\n                        ids = [];\r\n                        for (j = shapes.length; j--;) {\r\n                            shapes[j].append();\r\n                            ids.push(shapes[j].id);\r\n                        }\r\n                        regionShapes[i] = ids;\r\n                    } else {\r\n                        shapes.append();\r\n                        regionShapes[i] = shapes.id; // store just the shapeid\r\n                    }\r\n                } else {\r\n                    // null value\r\n                    regionShapes[i] = null;\r\n                }\r\n            }\r\n            target.render();\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Line charts\r\n     */\r\n    $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {\r\n        type: 'line',\r\n\r\n        init: function (el, values, options, width, height) {\r\n            line._super.init.call(this, el, values, options, width, height);\r\n            this.vertices = [];\r\n            this.regionMap = [];\r\n            this.xvalues = [];\r\n            this.yvalues = [];\r\n            this.yminmax = [];\r\n            this.hightlightSpotId = null;\r\n            this.lastShapeId = null;\r\n            this.initTarget();\r\n        },\r\n\r\n        getRegion: function (el, x, y) {\r\n            var i,\r\n                regionMap = this.regionMap; // maps regions to value positions\r\n            for (i = regionMap.length; i--;) {\r\n                if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {\r\n                    return regionMap[i][2];\r\n                }\r\n            }\r\n            return undefined;\r\n        },\r\n\r\n        getCurrentRegionFields: function () {\r\n            var currentRegion = this.currentRegion;\r\n            return {\r\n                isNull: this.yvalues[currentRegion] === null,\r\n                x: this.xvalues[currentRegion],\r\n                y: this.yvalues[currentRegion],\r\n                color: this.options.get('lineColor'),\r\n                fillColor: this.options.get('fillColor'),\r\n                offset: currentRegion\r\n            };\r\n        },\r\n\r\n        renderHighlight: function () {\r\n            var currentRegion = this.currentRegion,\r\n                target = this.target,\r\n                vertex = this.vertices[currentRegion],\r\n                options = this.options,\r\n                spotRadius = options.get('spotRadius'),\r\n                highlightSpotColor = options.get('highlightSpotColor'),\r\n                highlightLineColor = options.get('highlightLineColor'),\r\n                highlightSpot, highlightLine;\r\n\r\n            if (!vertex) {\r\n                return;\r\n            }\r\n            if (spotRadius && highlightSpotColor) {\r\n                highlightSpot = target.drawCircle(vertex[0], vertex[1],\r\n                    spotRadius, undefined, highlightSpotColor);\r\n                this.highlightSpotId = highlightSpot.id;\r\n                target.insertAfterShape(this.lastShapeId, highlightSpot);\r\n            }\r\n            if (highlightLineColor) {\r\n                highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],\r\n                    this.canvasTop + this.canvasHeight, highlightLineColor);\r\n                this.highlightLineId = highlightLine.id;\r\n                target.insertAfterShape(this.lastShapeId, highlightLine);\r\n            }\r\n        },\r\n\r\n        removeHighlight: function () {\r\n            var target = this.target;\r\n            if (this.highlightSpotId) {\r\n                target.removeShapeId(this.highlightSpotId);\r\n                this.highlightSpotId = null;\r\n            }\r\n            if (this.highlightLineId) {\r\n                target.removeShapeId(this.highlightLineId);\r\n                this.highlightLineId = null;\r\n            }\r\n        },\r\n\r\n        scanValues: function () {\r\n            var values = this.values,\r\n                valcount = values.length,\r\n                xvalues = this.xvalues,\r\n                yvalues = this.yvalues,\r\n                yminmax = this.yminmax,\r\n                i, val, isStr, isArray, sp;\r\n            for (i = 0; i < valcount; i++) {\r\n                val = values[i];\r\n                isStr = typeof(values[i]) === 'string';\r\n                isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;\r\n                sp = isStr && values[i].split(':');\r\n                if (isStr && sp.length === 2) { // x:y\r\n                    xvalues.push(Number(sp[0]));\r\n                    yvalues.push(Number(sp[1]));\r\n                    yminmax.push(Number(sp[1]));\r\n                } else if (isArray) {\r\n                    xvalues.push(val[0]);\r\n                    yvalues.push(val[1]);\r\n                    yminmax.push(val[1]);\r\n                } else {\r\n                    xvalues.push(i);\r\n                    if (values[i] === null || values[i] === 'null') {\r\n                        yvalues.push(null);\r\n                    } else {\r\n                        yvalues.push(Number(val));\r\n                        yminmax.push(Number(val));\r\n                    }\r\n                }\r\n            }\r\n            if (this.options.get('xvalues')) {\r\n                xvalues = this.options.get('xvalues');\r\n            }\r\n\r\n            this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);\r\n            this.miny = this.minyorg = Math.min.apply(Math, yminmax);\r\n\r\n            this.maxx = Math.max.apply(Math, xvalues);\r\n            this.minx = Math.min.apply(Math, xvalues);\r\n\r\n            this.xvalues = xvalues;\r\n            this.yvalues = yvalues;\r\n            this.yminmax = yminmax;\r\n\r\n        },\r\n\r\n        processRangeOptions: function () {\r\n            var options = this.options,\r\n                normalRangeMin = options.get('normalRangeMin'),\r\n                normalRangeMax = options.get('normalRangeMax');\r\n\r\n            if (normalRangeMin !== undefined) {\r\n                if (normalRangeMin < this.miny) {\r\n                    this.miny = normalRangeMin;\r\n                }\r\n                if (normalRangeMax > this.maxy) {\r\n                    this.maxy = normalRangeMax;\r\n                }\r\n            }\r\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {\r\n                this.miny = options.get('chartRangeMin');\r\n            }\r\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {\r\n                this.maxy = options.get('chartRangeMax');\r\n            }\r\n            if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {\r\n                this.minx = options.get('chartRangeMinX');\r\n            }\r\n            if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {\r\n                this.maxx = options.get('chartRangeMaxX');\r\n            }\r\n\r\n        },\r\n\r\n        drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {\r\n            var normalRangeMin = this.options.get('normalRangeMin'),\r\n                normalRangeMax = this.options.get('normalRangeMax'),\r\n                ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),\r\n                height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);\r\n            this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();\r\n        },\r\n\r\n        render: function () {\r\n            var options = this.options,\r\n                target = this.target,\r\n                canvasWidth = this.canvasWidth,\r\n                canvasHeight = this.canvasHeight,\r\n                vertices = this.vertices,\r\n                spotRadius = options.get('spotRadius'),\r\n                regionMap = this.regionMap,\r\n                rangex, rangey, yvallast,\r\n                canvasTop, canvasLeft,\r\n                vertex, path, paths, x, y, xnext, xpos, xposnext,\r\n                last, next, yvalcount, lineShapes, fillShapes, plen,\r\n                valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i;\r\n\r\n            if (!line._super.render.call(this)) {\r\n                return;\r\n            }\r\n\r\n            this.scanValues();\r\n            this.processRangeOptions();\r\n\r\n            xvalues = this.xvalues;\r\n            yvalues = this.yvalues;\r\n\r\n            if (!this.yminmax.length || this.yvalues.length < 2) {\r\n                // empty or all null valuess\r\n                return;\r\n            }\r\n\r\n            canvasTop = canvasLeft = 0;\r\n\r\n            rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;\r\n            rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;\r\n            yvallast = this.yvalues.length - 1;\r\n\r\n            if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {\r\n                spotRadius = 0;\r\n            }\r\n            if (spotRadius) {\r\n                // adjust the canvas size as required so that spots will fit\r\n                hlSpotsEnabled = options.get('highlightSpotColor') &&  !options.get('disableInteraction');\r\n                if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {\r\n                    canvasHeight -= Math.ceil(spotRadius);\r\n                }\r\n                if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {\r\n                    canvasHeight -= Math.ceil(spotRadius);\r\n                    canvasTop += Math.ceil(spotRadius);\r\n                }\r\n                if (hlSpotsEnabled ||\r\n                     ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) {\r\n                    canvasLeft += Math.ceil(spotRadius);\r\n                    canvasWidth -= Math.ceil(spotRadius);\r\n                }\r\n                if (hlSpotsEnabled || options.get('spotColor') ||\r\n                    (options.get('minSpotColor') || options.get('maxSpotColor') &&\r\n                        (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {\r\n                    canvasWidth -= Math.ceil(spotRadius);\r\n                }\r\n            }\r\n\r\n\r\n            canvasHeight--;\r\n\r\n            if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) {\r\n                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);\r\n            }\r\n\r\n            path = [];\r\n            paths = [path];\r\n            last = next = null;\r\n            yvalcount = yvalues.length;\r\n            for (i = 0; i < yvalcount; i++) {\r\n                x = xvalues[i];\r\n                xnext = xvalues[i + 1];\r\n                y = yvalues[i];\r\n                xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));\r\n                xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;\r\n                next = xpos + ((xposnext - xpos) / 2);\r\n                regionMap[i] = [last || 0, next, i];\r\n                last = next;\r\n                if (y === null) {\r\n                    if (i) {\r\n                        if (yvalues[i - 1] !== null) {\r\n                            path = [];\r\n                            paths.push(path);\r\n                        }\r\n                        vertices.push(null);\r\n                    }\r\n                } else {\r\n                    if (y < this.miny) {\r\n                        y = this.miny;\r\n                    }\r\n                    if (y > this.maxy) {\r\n                        y = this.maxy;\r\n                    }\r\n                    if (!path.length) {\r\n                        // previous value was null\r\n                        path.push([xpos, canvasTop + canvasHeight]);\r\n                    }\r\n                    vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];\r\n                    path.push(vertex);\r\n                    vertices.push(vertex);\r\n                }\r\n            }\r\n\r\n            lineShapes = [];\r\n            fillShapes = [];\r\n            plen = paths.length;\r\n            for (i = 0; i < plen; i++) {\r\n                path = paths[i];\r\n                if (path.length) {\r\n                    if (options.get('fillColor')) {\r\n                        path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);\r\n                        fillShapes.push(path.slice(0));\r\n                        path.pop();\r\n                    }\r\n                    // if there's only a single point in this path, then we want to display it\r\n                    // as a vertical line which means we keep path[0]  as is\r\n                    if (path.length > 2) {\r\n                        // else we want the first value\r\n                        path[0] = [path[0][0], path[1][1]];\r\n                    }\r\n                    lineShapes.push(path);\r\n                }\r\n            }\r\n\r\n            // draw the fill first, then optionally the normal range, then the line on top of that\r\n            plen = fillShapes.length;\r\n            for (i = 0; i < plen; i++) {\r\n                target.drawShape(fillShapes[i],\r\n                    options.get('fillColor'), options.get('fillColor')).append();\r\n            }\r\n\r\n            if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) {\r\n                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);\r\n            }\r\n\r\n            plen = lineShapes.length;\r\n            for (i = 0; i < plen; i++) {\r\n                target.drawShape(lineShapes[i], options.get('lineColor'), undefined,\r\n                    options.get('lineWidth')).append();\r\n            }\r\n\r\n            if (spotRadius && options.get('valueSpots')) {\r\n                valueSpots = options.get('valueSpots');\r\n                if (valueSpots.get === undefined) {\r\n                    valueSpots = new RangeMap(valueSpots);\r\n                }\r\n                for (i = 0; i < yvalcount; i++) {\r\n                    color = valueSpots.get(yvalues[i]);\r\n                    if (color) {\r\n                        target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),\r\n                            canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),\r\n                            spotRadius, undefined,\r\n                            color).append();\r\n                    }\r\n                }\r\n\r\n            }\r\n            if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) {\r\n                target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),\r\n                    canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),\r\n                    spotRadius, undefined,\r\n                    options.get('spotColor')).append();\r\n            }\r\n            if (this.maxy !== this.minyorg) {\r\n                if (spotRadius && options.get('minSpotColor')) {\r\n                    x = xvalues[$.inArray(this.minyorg, yvalues)];\r\n                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),\r\n                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),\r\n                        spotRadius, undefined,\r\n                        options.get('minSpotColor')).append();\r\n                }\r\n                if (spotRadius && options.get('maxSpotColor')) {\r\n                    x = xvalues[$.inArray(this.maxyorg, yvalues)];\r\n                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),\r\n                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),\r\n                        spotRadius, undefined,\r\n                        options.get('maxSpotColor')).append();\r\n                }\r\n            }\r\n\r\n            this.lastShapeId = target.getLastShapeId();\r\n            this.canvasTop = canvasTop;\r\n            target.render();\r\n        }\r\n    });\r\n\r\n    /**\r\n     * Bar charts\r\n     */\r\n    $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {\r\n        type: 'bar',\r\n\r\n        init: function (el, values, options, width, height) {\r\n            var barWidth = parseInt(options.get('barWidth'), 10),\r\n                barSpacing = parseInt(options.get('barSpacing'), 10),\r\n                chartRangeMin = options.get('chartRangeMin'),\r\n                chartRangeMax = options.get('chartRangeMax'),\r\n                chartRangeClip = options.get('chartRangeClip'),\r\n                stackMin = Infinity,\r\n                stackMax = -Infinity,\r\n                isStackString, groupMin, groupMax, stackRanges,\r\n                numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,\r\n                stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;\r\n            bar._super.init.call(this, el, values, options, width, height);\r\n\r\n            // scan values to determine whether to stack bars\r\n            for (i = 0, vlen = values.length; i < vlen; i++) {\r\n                val = values[i];\r\n                isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;\r\n                if (isStackString || $.isArray(val)) {\r\n                    stacked = true;\r\n                    if (isStackString) {\r\n                        val = values[i] = normalizeValues(val.split(':'));\r\n                    }\r\n                    val = remove(val, null); // min/max will treat null as zero\r\n                    groupMin = Math.min.apply(Math, val);\r\n                    groupMax = Math.max.apply(Math, val);\r\n                    if (groupMin < stackMin) {\r\n                        stackMin = groupMin;\r\n                    }\r\n                    if (groupMax > stackMax) {\r\n                        stackMax = groupMax;\r\n                    }\r\n                }\r\n            }\r\n\r\n            this.stacked = stacked;\r\n            this.regionShapes = {};\r\n            this.barWidth = barWidth;\r\n            this.barSpacing = barSpacing;\r\n            this.totalBarWidth = barWidth + barSpacing;\r\n            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);\r\n\r\n            this.initTarget();\r\n\r\n            if (chartRangeClip) {\r\n                clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;\r\n                clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;\r\n            }\r\n\r\n            numValues = [];\r\n            stackRanges = stacked ? [] : numValues;\r\n            var stackTotals = [];\r\n            var stackRangesNeg = [];\r\n            for (i = 0, vlen = values.length; i < vlen; i++) {\r\n                if (stacked) {\r\n                    vlist = values[i];\r\n                    values[i] = svals = [];\r\n                    stackTotals[i] = 0;\r\n                    stackRanges[i] = stackRangesNeg[i] = 0;\r\n                    for (j = 0, slen = vlist.length; j < slen; j++) {\r\n                        val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];\r\n                        if (val !== null) {\r\n                            if (val > 0) {\r\n                                stackTotals[i] += val;\r\n                            }\r\n                            if (stackMin < 0 && stackMax > 0) {\r\n                                if (val < 0) {\r\n                                    stackRangesNeg[i] += Math.abs(val);\r\n                                } else {\r\n                                    stackRanges[i] += val;\r\n                                }\r\n                            } else {\r\n                                stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));\r\n                            }\r\n                            numValues.push(val);\r\n                        }\r\n                    }\r\n                } else {\r\n                    val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];\r\n                    val = values[i] = normalizeValue(val);\r\n                    if (val !== null) {\r\n                        numValues.push(val);\r\n                    }\r\n                }\r\n            }\r\n            this.max = max = Math.max.apply(Math, numValues);\r\n            this.min = min = Math.min.apply(Math, numValues);\r\n            this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;\r\n            this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;\r\n\r\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {\r\n                min = options.get('chartRangeMin');\r\n            }\r\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {\r\n                max = options.get('chartRangeMax');\r\n            }\r\n\r\n            this.zeroAxis = zeroAxis = options.get('zeroAxis', true);\r\n            if (min <= 0 && max >= 0 && zeroAxis) {\r\n                xaxisOffset = 0;\r\n            } else if (zeroAxis == false) {\r\n                xaxisOffset = min;\r\n            } else if (min > 0) {\r\n                xaxisOffset = min;\r\n            } else {\r\n                xaxisOffset = max;\r\n            }\r\n            this.xaxisOffset = xaxisOffset;\r\n\r\n            range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;\r\n\r\n            // as we plot zero/min values a single pixel line, we add a pixel to all other\r\n            // values - Reduce the effective canvas size to suit\r\n            this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;\r\n\r\n            if (min < xaxisOffset) {\r\n                yMaxCalc = (stacked && max >= 0) ? stackMax : max;\r\n                yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;\r\n                if (yoffset !== Math.ceil(yoffset)) {\r\n                    this.canvasHeightEf -= 2;\r\n                    yoffset = Math.ceil(yoffset);\r\n                }\r\n            } else {\r\n                yoffset = this.canvasHeight;\r\n            }\r\n            this.yoffset = yoffset;\r\n\r\n            if ($.isArray(options.get('colorMap'))) {\r\n                this.colorMapByIndex = options.get('colorMap');\r\n                this.colorMapByValue = null;\r\n            } else {\r\n                this.colorMapByIndex = null;\r\n                this.colorMapByValue = options.get('colorMap');\r\n                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {\r\n                    this.colorMapByValue = new RangeMap(this.colorMapByValue);\r\n                }\r\n            }\r\n\r\n            this.range = range;\r\n        },\r\n\r\n        getRegion: function (el, x, y) {\r\n            var result = Math.floor(x / this.totalBarWidth);\r\n            return (result < 0 || result >= this.values.length) ? undefined : result;\r\n        },\r\n\r\n        getCurrentRegionFields: function () {\r\n            var currentRegion = this.currentRegion,\r\n                values = ensureArray(this.values[currentRegion]),\r\n                result = [],\r\n                value, i;\r\n            for (i = values.length; i--;) {\r\n                value = values[i];\r\n                result.push({\r\n                    isNull: value === null,\r\n                    value: value,\r\n                    color: this.calcColor(i, value, currentRegion),\r\n                    offset: currentRegion\r\n                });\r\n            }\r\n            return result;\r\n        },\r\n\r\n        calcColor: function (stacknum, value, valuenum) {\r\n            var colorMapByIndex = this.colorMapByIndex,\r\n                colorMapByValue = this.colorMapByValue,\r\n                options = this.options,\r\n                color, newColor;\r\n            if (this.stacked) {\r\n                color = options.get('stackedBarColor');\r\n            } else {\r\n                color = (value < 0) ? options.get('negBarColor') : options.get('barColor');\r\n            }\r\n            if (value === 0 && options.get('zeroColor') !== undefined) {\r\n                color = options.get('zeroColor');\r\n            }\r\n            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {\r\n                color = newColor;\r\n            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {\r\n                color = colorMapByIndex[valuenum];\r\n            }\r\n            return $.isArray(color) ? color[stacknum % color.length] : color;\r\n        },\r\n\r\n        /**\r\n         * Render bar(s) for a region\r\n         */\r\n        renderRegion: function (valuenum, highlight) {\r\n            var vals = this.values[valuenum],\r\n                options = this.options,\r\n                xaxisOffset = this.xaxisOffset,\r\n                result = [],\r\n                range = this.range,\r\n                stacked = this.stacked,\r\n                target = this.target,\r\n                x = valuenum * this.totalBarWidth,\r\n                canvasHeightEf = this.canvasHeightEf,\r\n                yoffset = this.yoffset,\r\n                y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;\r\n\r\n            vals = $.isArray(vals) ? vals : [vals];\r\n            valcount = vals.length;\r\n            val = vals[0];\r\n            isNull = all(null, vals);\r\n            allMin = all(xaxisOffset, vals, true);\r\n\r\n            if (isNull) {\r\n                if (options.get('nullColor')) {\r\n                    color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);\r\n                    y = (yoffset > 0) ? yoffset - 1 : yoffset;\r\n                    return target.drawRect(x, y, this.barWidth - 1, 0, color, color);\r\n                } else {\r\n                    return undefined;\r\n                }\r\n            }\r\n            yoffsetNeg = yoffset;\r\n            for (i = 0; i < valcount; i++) {\r\n                val = vals[i];\r\n\r\n                if (stacked && val === xaxisOffset) {\r\n                    if (!allMin || minPlotted) {\r\n                        continue;\r\n                    }\r\n                    minPlotted = true;\r\n                }\r\n\r\n                if (range > 0) {\r\n                    height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;\r\n                } else {\r\n                    height = 1;\r\n                }\r\n                if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {\r\n                    y = yoffsetNeg;\r\n                    yoffsetNeg += height;\r\n                } else {\r\n                    y = yoffset - height;\r\n                    yoffset -= height;\r\n                }\r\n                color = this.calcColor(i, val, valuenum);\r\n                if (highlight) {\r\n                    color = this.calcHighlightColor(color, options);\r\n                }\r\n                result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));\r\n            }\r\n            if (result.length === 1) {\r\n                return result[0];\r\n            }\r\n            return result;\r\n        }\r\n    });\r\n\r\n    /**\r\n     * Tristate charts\r\n     */\r\n    $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {\r\n        type: 'tristate',\r\n\r\n        init: function (el, values, options, width, height) {\r\n            var barWidth = parseInt(options.get('barWidth'), 10),\r\n                barSpacing = parseInt(options.get('barSpacing'), 10);\r\n            tristate._super.init.call(this, el, values, options, width, height);\r\n\r\n            this.regionShapes = {};\r\n            this.barWidth = barWidth;\r\n            this.barSpacing = barSpacing;\r\n            this.totalBarWidth = barWidth + barSpacing;\r\n            this.values = $.map(values, Number);\r\n            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);\r\n\r\n            if ($.isArray(options.get('colorMap'))) {\r\n                this.colorMapByIndex = options.get('colorMap');\r\n                this.colorMapByValue = null;\r\n            } else {\r\n                this.colorMapByIndex = null;\r\n                this.colorMapByValue = options.get('colorMap');\r\n                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {\r\n                    this.colorMapByValue = new RangeMap(this.colorMapByValue);\r\n                }\r\n            }\r\n            this.initTarget();\r\n        },\r\n\r\n        getRegion: function (el, x, y) {\r\n            return Math.floor(x / this.totalBarWidth);\r\n        },\r\n\r\n        getCurrentRegionFields: function () {\r\n            var currentRegion = this.currentRegion;\r\n            return {\r\n                isNull: this.values[currentRegion] === undefined,\r\n                value: this.values[currentRegion],\r\n                color: this.calcColor(this.values[currentRegion], currentRegion),\r\n                offset: currentRegion\r\n            };\r\n        },\r\n\r\n        calcColor: function (value, valuenum) {\r\n            var values = this.values,\r\n                options = this.options,\r\n                colorMapByIndex = this.colorMapByIndex,\r\n                colorMapByValue = this.colorMapByValue,\r\n                color, newColor;\r\n\r\n            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {\r\n                color = newColor;\r\n            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {\r\n                color = colorMapByIndex[valuenum];\r\n            } else if (values[valuenum] < 0) {\r\n                color = options.get('negBarColor');\r\n            } else if (values[valuenum] > 0) {\r\n                color = options.get('posBarColor');\r\n            } else {\r\n                color = options.get('zeroBarColor');\r\n            }\r\n            return color;\r\n        },\r\n\r\n        renderRegion: function (valuenum, highlight) {\r\n            var values = this.values,\r\n                options = this.options,\r\n                target = this.target,\r\n                canvasHeight, height, halfHeight,\r\n                x, y, color;\r\n\r\n            canvasHeight = target.pixelHeight;\r\n            halfHeight = Math.round(canvasHeight / 2);\r\n\r\n            x = valuenum * this.totalBarWidth;\r\n            if (values[valuenum] < 0) {\r\n                y = halfHeight;\r\n                height = halfHeight - 1;\r\n            } else if (values[valuenum] > 0) {\r\n                y = 0;\r\n                height = halfHeight - 1;\r\n            } else {\r\n                y = halfHeight - 1;\r\n                height = 2;\r\n            }\r\n            color = this.calcColor(values[valuenum], valuenum);\r\n            if (color === null) {\r\n                return;\r\n            }\r\n            if (highlight) {\r\n                color = this.calcHighlightColor(color, options);\r\n            }\r\n            return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);\r\n        }\r\n    });\r\n\r\n    /**\r\n     * Discrete charts\r\n     */\r\n    $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {\r\n        type: 'discrete',\r\n\r\n        init: function (el, values, options, width, height) {\r\n            discrete._super.init.call(this, el, values, options, width, height);\r\n\r\n            this.regionShapes = {};\r\n            this.values = values = $.map(values, Number);\r\n            this.min = Math.min.apply(Math, values);\r\n            this.max = Math.max.apply(Math, values);\r\n            this.range = this.max - this.min;\r\n            this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;\r\n            this.interval = Math.floor(width / values.length);\r\n            this.itemWidth = width / values.length;\r\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {\r\n                this.min = options.get('chartRangeMin');\r\n            }\r\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {\r\n                this.max = options.get('chartRangeMax');\r\n            }\r\n            this.initTarget();\r\n            if (this.target) {\r\n                this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');\r\n            }\r\n        },\r\n\r\n        getRegion: function (el, x, y) {\r\n            return Math.floor(x / this.itemWidth);\r\n        },\r\n\r\n        getCurrentRegionFields: function () {\r\n            var currentRegion = this.currentRegion;\r\n            return {\r\n                isNull: this.values[currentRegion] === undefined,\r\n                value: this.values[currentRegion],\r\n                offset: currentRegion\r\n            };\r\n        },\r\n\r\n        renderRegion: function (valuenum, highlight) {\r\n            var values = this.values,\r\n                options = this.options,\r\n                min = this.min,\r\n                max = this.max,\r\n                range = this.range,\r\n                interval = this.interval,\r\n                target = this.target,\r\n                canvasHeight = this.canvasHeight,\r\n                lineHeight = this.lineHeight,\r\n                pheight = canvasHeight - lineHeight,\r\n                ytop, val, color, x;\r\n\r\n            val = clipval(values[valuenum], min, max);\r\n            x = valuenum * interval;\r\n            ytop = Math.round(pheight - pheight * ((val - min) / range));\r\n            color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');\r\n            if (highlight) {\r\n                color = this.calcHighlightColor(color, options);\r\n            }\r\n            return target.drawLine(x, ytop, x, ytop + lineHeight, color);\r\n        }\r\n    });\r\n\r\n    /**\r\n     * Bullet charts\r\n     */\r\n    $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {\r\n        type: 'bullet',\r\n\r\n        init: function (el, values, options, width, height) {\r\n            var min, max, vals;\r\n            bullet._super.init.call(this, el, values, options, width, height);\r\n\r\n            // values: target, performance, range1, range2, range3\r\n            this.values = values = normalizeValues(values);\r\n            // target or performance could be null\r\n            vals = values.slice();\r\n            vals[0] = vals[0] === null ? vals[2] : vals[0];\r\n            vals[1] = values[1] === null ? vals[2] : vals[1];\r\n            min = Math.min.apply(Math, values);\r\n            max = Math.max.apply(Math, values);\r\n            if (options.get('base') === undefined) {\r\n                min = min < 0 ? min : 0;\r\n            } else {\r\n                min = options.get('base');\r\n            }\r\n            this.min = min;\r\n            this.max = max;\r\n            this.range = max - min;\r\n            this.shapes = {};\r\n            this.valueShapes = {};\r\n            this.regiondata = {};\r\n            this.width = width = options.get('width') === 'auto' ? '4.0em' : width;\r\n            this.target = this.$el.simpledraw(width, height, options.get('composite'));\r\n            if (!values.length) {\r\n                this.disabled = true;\r\n            }\r\n            this.initTarget();\r\n        },\r\n\r\n        getRegion: function (el, x, y) {\r\n            var shapeid = this.target.getShapeAt(el, x, y);\r\n            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;\r\n        },\r\n\r\n        getCurrentRegionFields: function () {\r\n            var currentRegion = this.currentRegion;\r\n            return {\r\n                fieldkey: currentRegion.substr(0, 1),\r\n                value: this.values[currentRegion.substr(1)],\r\n                region: currentRegion\r\n            };\r\n        },\r\n\r\n        changeHighlight: function (highlight) {\r\n            var currentRegion = this.currentRegion,\r\n                shapeid = this.valueShapes[currentRegion],\r\n                shape;\r\n            delete this.shapes[shapeid];\r\n            switch (currentRegion.substr(0, 1)) {\r\n                case 'r':\r\n                    shape = this.renderRange(currentRegion.substr(1), highlight);\r\n                    break;\r\n                case 'p':\r\n                    shape = this.renderPerformance(highlight);\r\n                    break;\r\n                case 't':\r\n                    shape = this.renderTarget(highlight);\r\n                    break;\r\n            }\r\n            this.valueShapes[currentRegion] = shape.id;\r\n            this.shapes[shape.id] = currentRegion;\r\n            this.target.replaceWithShape(shapeid, shape);\r\n        },\r\n\r\n        renderRange: function (rn, highlight) {\r\n            var rangeval = this.values[rn],\r\n                rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)),\r\n                color = this.options.get('rangeColors')[rn - 2];\r\n            if (highlight) {\r\n                color = this.calcHighlightColor(color, this.options);\r\n            }\r\n            return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color);\r\n        },\r\n\r\n        renderPerformance: function (highlight) {\r\n            var perfval = this.values[1],\r\n                perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)),\r\n                color = this.options.get('performanceColor');\r\n            if (highlight) {\r\n                color = this.calcHighlightColor(color, this.options);\r\n            }\r\n            return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1,\r\n                Math.round(this.canvasHeight * 0.4) - 1, color, color);\r\n        },\r\n\r\n        renderTarget: function (highlight) {\r\n            var targetval = this.values[0],\r\n                x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)),\r\n                targettop = Math.round(this.canvasHeight * 0.10),\r\n                targetheight = this.canvasHeight - (targettop * 2),\r\n                color = this.options.get('targetColor');\r\n            if (highlight) {\r\n                color = this.calcHighlightColor(color, this.options);\r\n            }\r\n            return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color);\r\n        },\r\n\r\n        render: function () {\r\n            var vlen = this.values.length,\r\n                target = this.target,\r\n                i, shape;\r\n            if (!bullet._super.render.call(this)) {\r\n                return;\r\n            }\r\n            for (i = 2; i < vlen; i++) {\r\n                shape = this.renderRange(i).append();\r\n                this.shapes[shape.id] = 'r' + i;\r\n                this.valueShapes['r' + i] = shape.id;\r\n            }\r\n            if (this.values[1] !== null) {\r\n                shape = this.renderPerformance().append();\r\n                this.shapes[shape.id] = 'p1';\r\n                this.valueShapes.p1 = shape.id;\r\n            }\r\n            if (this.values[0] !== null) {\r\n                shape = this.renderTarget().append();\r\n                this.shapes[shape.id] = 't0';\r\n                this.valueShapes.t0 = shape.id;\r\n            }\r\n            target.render();\r\n        }\r\n    });\r\n\r\n    /**\r\n     * Pie charts\r\n     */\r\n    $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, {\r\n        type: 'pie',\r\n\r\n        init: function (el, values, options, width, height) {\r\n            var total = 0, i;\r\n\r\n            pie._super.init.call(this, el, values, options, width, height);\r\n\r\n            this.shapes = {}; // map shape ids to value offsets\r\n            this.valueShapes = {}; // maps value offsets to shape ids\r\n            this.values = values = $.map(values, Number);\r\n\r\n            if (options.get('width') === 'auto') {\r\n                this.width = this.height;\r\n            }\r\n\r\n            if (values.length > 0) {\r\n                for (i = values.length; i--;) {\r\n                    total += values[i];\r\n                }\r\n            }\r\n            this.total = total;\r\n            this.initTarget();\r\n            this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2);\r\n        },\r\n\r\n        getRegion: function (el, x, y) {\r\n            var shapeid = this.target.getShapeAt(el, x, y);\r\n            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;\r\n        },\r\n\r\n        getCurrentRegionFields: function () {\r\n            var currentRegion = this.currentRegion;\r\n            return {\r\n                isNull: this.values[currentRegion] === undefined,\r\n                value: this.values[currentRegion],\r\n                percent: this.values[currentRegion] / this.total * 100,\r\n                color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length],\r\n                offset: currentRegion\r\n            };\r\n        },\r\n\r\n        changeHighlight: function (highlight) {\r\n            var currentRegion = this.currentRegion,\r\n                 newslice = this.renderSlice(currentRegion, highlight),\r\n                 shapeid = this.valueShapes[currentRegion];\r\n            delete this.shapes[shapeid];\r\n            this.target.replaceWithShape(shapeid, newslice);\r\n            this.valueShapes[currentRegion] = newslice.id;\r\n            this.shapes[newslice.id] = currentRegion;\r\n        },\r\n\r\n        renderSlice: function (valuenum, highlight) {\r\n            var target = this.target,\r\n                options = this.options,\r\n                radius = this.radius,\r\n                borderWidth = options.get('borderWidth'),\r\n                offset = options.get('offset'),\r\n                circle = 2 * Math.PI,\r\n                values = this.values,\r\n                total = this.total,\r\n                next = offset ? (2*Math.PI)*(offset/360) : 0,\r\n                start, end, i, vlen, color;\r\n\r\n            vlen = values.length;\r\n            for (i = 0; i < vlen; i++) {\r\n                start = next;\r\n                end = next;\r\n                if (total > 0) {  // avoid divide by zero\r\n                    end = next + (circle * (values[i] / total));\r\n                }\r\n                if (valuenum === i) {\r\n                    color = options.get('sliceColors')[i % options.get('sliceColors').length];\r\n                    if (highlight) {\r\n                        color = this.calcHighlightColor(color, options);\r\n                    }\r\n\r\n                    return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color);\r\n                }\r\n                next = end;\r\n            }\r\n        },\r\n\r\n        render: function () {\r\n            var target = this.target,\r\n                values = this.values,\r\n                options = this.options,\r\n                radius = this.radius,\r\n                borderWidth = options.get('borderWidth'),\r\n                shape, i;\r\n\r\n            if (!pie._super.render.call(this)) {\r\n                return;\r\n            }\r\n            if (borderWidth) {\r\n                target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)),\r\n                    options.get('borderColor'), undefined, borderWidth).append();\r\n            }\r\n            for (i = values.length; i--;) {\r\n                if (values[i]) { // don't render zero values\r\n                    shape = this.renderSlice(i).append();\r\n                    this.valueShapes[i] = shape.id; // store just the shapeid\r\n                    this.shapes[shape.id] = i;\r\n                }\r\n            }\r\n            target.render();\r\n        }\r\n    });\r\n\r\n    /**\r\n     * Box plots\r\n     */\r\n    $.fn.sparkline.box = box = createClass($.fn.sparkline._base, {\r\n        type: 'box',\r\n\r\n        init: function (el, values, options, width, height) {\r\n            box._super.init.call(this, el, values, options, width, height);\r\n            this.values = $.map(values, Number);\r\n            this.width = options.get('width') === 'auto' ? '4.0em' : width;\r\n            this.initTarget();\r\n            if (!this.values.length) {\r\n                this.disabled = 1;\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Simulate a single region\r\n         */\r\n        getRegion: function () {\r\n            return 1;\r\n        },\r\n\r\n        getCurrentRegionFields: function () {\r\n            var result = [\r\n                { field: 'lq', value: this.quartiles[0] },\r\n                { field: 'med', value: this.quartiles[1] },\r\n                { field: 'uq', value: this.quartiles[2] }\r\n            ];\r\n            if (this.loutlier !== undefined) {\r\n                result.push({ field: 'lo', value: this.loutlier});\r\n            }\r\n            if (this.routlier !== undefined) {\r\n                result.push({ field: 'ro', value: this.routlier});\r\n            }\r\n            if (this.lwhisker !== undefined) {\r\n                result.push({ field: 'lw', value: this.lwhisker});\r\n            }\r\n            if (this.rwhisker !== undefined) {\r\n                result.push({ field: 'rw', value: this.rwhisker});\r\n            }\r\n            return result;\r\n        },\r\n\r\n        render: function () {\r\n            var target = this.target,\r\n                values = this.values,\r\n                vlen = values.length,\r\n                options = this.options,\r\n                canvasWidth = this.canvasWidth,\r\n                canvasHeight = this.canvasHeight,\r\n                minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'),\r\n                maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'),\r\n                canvasLeft = 0,\r\n                lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i,\r\n                size, unitSize;\r\n\r\n            if (!box._super.render.call(this)) {\r\n                return;\r\n            }\r\n\r\n            if (options.get('raw')) {\r\n                if (options.get('showOutliers') && values.length > 5) {\r\n                    loutlier = values[0];\r\n                    lwhisker = values[1];\r\n                    q1 = values[2];\r\n                    q2 = values[3];\r\n                    q3 = values[4];\r\n                    rwhisker = values[5];\r\n                    routlier = values[6];\r\n                } else {\r\n                    lwhisker = values[0];\r\n                    q1 = values[1];\r\n                    q2 = values[2];\r\n                    q3 = values[3];\r\n                    rwhisker = values[4];\r\n                }\r\n            } else {\r\n                values.sort(function (a, b) { return a - b; });\r\n                q1 = quartile(values, 1);\r\n                q2 = quartile(values, 2);\r\n                q3 = quartile(values, 3);\r\n                iqr = q3 - q1;\r\n                if (options.get('showOutliers')) {\r\n                    lwhisker = rwhisker = undefined;\r\n                    for (i = 0; i < vlen; i++) {\r\n                        if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) {\r\n                            lwhisker = values[i];\r\n                        }\r\n                        if (values[i] < q3 + (iqr * options.get('outlierIQR'))) {\r\n                            rwhisker = values[i];\r\n                        }\r\n                    }\r\n                    loutlier = values[0];\r\n                    routlier = values[vlen - 1];\r\n                } else {\r\n                    lwhisker = values[0];\r\n                    rwhisker = values[vlen - 1];\r\n                }\r\n            }\r\n            this.quartiles = [q1, q2, q3];\r\n            this.lwhisker = lwhisker;\r\n            this.rwhisker = rwhisker;\r\n            this.loutlier = loutlier;\r\n            this.routlier = routlier;\r\n\r\n            unitSize = canvasWidth / (maxValue - minValue + 1);\r\n            if (options.get('showOutliers')) {\r\n                canvasLeft = Math.ceil(options.get('spotRadius'));\r\n                canvasWidth -= 2 * Math.ceil(options.get('spotRadius'));\r\n                unitSize = canvasWidth / (maxValue - minValue + 1);\r\n                if (loutlier < lwhisker) {\r\n                    target.drawCircle((loutlier - minValue) * unitSize + canvasLeft,\r\n                        canvasHeight / 2,\r\n                        options.get('spotRadius'),\r\n                        options.get('outlierLineColor'),\r\n                        options.get('outlierFillColor')).append();\r\n                }\r\n                if (routlier > rwhisker) {\r\n                    target.drawCircle((routlier - minValue) * unitSize + canvasLeft,\r\n                        canvasHeight / 2,\r\n                        options.get('spotRadius'),\r\n                        options.get('outlierLineColor'),\r\n                        options.get('outlierFillColor')).append();\r\n                }\r\n            }\r\n\r\n            // box\r\n            target.drawRect(\r\n                Math.round((q1 - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight * 0.1),\r\n                Math.round((q3 - q1) * unitSize),\r\n                Math.round(canvasHeight * 0.8),\r\n                options.get('boxLineColor'),\r\n                options.get('boxFillColor')).append();\r\n            // left whisker\r\n            target.drawLine(\r\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight / 2),\r\n                Math.round((q1 - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight / 2),\r\n                options.get('lineColor')).append();\r\n            target.drawLine(\r\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight / 4),\r\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight - canvasHeight / 4),\r\n                options.get('whiskerColor')).append();\r\n            // right whisker\r\n            target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight / 2),\r\n                Math.round((q3 - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight / 2),\r\n                options.get('lineColor')).append();\r\n            target.drawLine(\r\n                Math.round((rwhisker - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight / 4),\r\n                Math.round((rwhisker - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight - canvasHeight / 4),\r\n                options.get('whiskerColor')).append();\r\n            // median line\r\n            target.drawLine(\r\n                Math.round((q2 - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight * 0.1),\r\n                Math.round((q2 - minValue) * unitSize + canvasLeft),\r\n                Math.round(canvasHeight * 0.9),\r\n                options.get('medianColor')).append();\r\n            if (options.get('target')) {\r\n                size = Math.ceil(options.get('spotRadius'));\r\n                target.drawLine(\r\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),\r\n                    Math.round((canvasHeight / 2) - size),\r\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),\r\n                    Math.round((canvasHeight / 2) + size),\r\n                    options.get('targetColor')).append();\r\n                target.drawLine(\r\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size),\r\n                    Math.round(canvasHeight / 2),\r\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size),\r\n                    Math.round(canvasHeight / 2),\r\n                    options.get('targetColor')).append();\r\n            }\r\n            target.render();\r\n        }\r\n    });\r\n\r\n    // Setup a very simple \"virtual canvas\" to make drawing the few shapes we need easier\r\n    // This is accessible as $(foo).simpledraw()\r\n\r\n    VShape = createClass({\r\n        init: function (target, id, type, args) {\r\n            this.target = target;\r\n            this.id = id;\r\n            this.type = type;\r\n            this.args = args;\r\n        },\r\n        append: function () {\r\n            this.target.appendShape(this);\r\n            return this;\r\n        }\r\n    });\r\n\r\n    VCanvas_base = createClass({\r\n        _pxregex: /(\\d+)(px)?\\s*$/i,\r\n\r\n        init: function (width, height, target) {\r\n            if (!width) {\r\n                return;\r\n            }\r\n            this.width = width;\r\n            this.height = height;\r\n            this.target = target;\r\n            this.lastShapeId = null;\r\n            if (target[0]) {\r\n                target = target[0];\r\n            }\r\n            $.data(target, '_jqs_vcanvas', this);\r\n        },\r\n\r\n        drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {\r\n            return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth);\r\n        },\r\n\r\n        drawShape: function (path, lineColor, fillColor, lineWidth) {\r\n            return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]);\r\n        },\r\n\r\n        drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {\r\n            return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]);\r\n        },\r\n\r\n        drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) {\r\n            return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]);\r\n        },\r\n\r\n        drawRect: function (x, y, width, height, lineColor, fillColor) {\r\n            return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]);\r\n        },\r\n\r\n        getElement: function () {\r\n            return this.canvas;\r\n        },\r\n\r\n        /**\r\n         * Return the most recently inserted shape id\r\n         */\r\n        getLastShapeId: function () {\r\n            return this.lastShapeId;\r\n        },\r\n\r\n        /**\r\n         * Clear and reset the canvas\r\n         */\r\n        reset: function () {\r\n            alert('reset not implemented');\r\n        },\r\n\r\n        _insert: function (el, target) {\r\n            $(target).html(el);\r\n        },\r\n\r\n        /**\r\n         * Calculate the pixel dimensions of the canvas\r\n         */\r\n        _calculatePixelDims: function (width, height, canvas) {\r\n            // XXX This should probably be a configurable option\r\n            var match;\r\n            match = this._pxregex.exec(height);\r\n            if (match) {\r\n                this.pixelHeight = match[1];\r\n            } else {\r\n                this.pixelHeight = $(canvas).height();\r\n            }\r\n            match = this._pxregex.exec(width);\r\n            if (match) {\r\n                this.pixelWidth = match[1];\r\n            } else {\r\n                this.pixelWidth = $(canvas).width();\r\n            }\r\n        },\r\n\r\n        /**\r\n         * Generate a shape object and id for later rendering\r\n         */\r\n        _genShape: function (shapetype, shapeargs) {\r\n            var id = shapeCount++;\r\n            shapeargs.unshift(id);\r\n            return new VShape(this, id, shapetype, shapeargs);\r\n        },\r\n\r\n        /**\r\n         * Add a shape to the end of the render queue\r\n         */\r\n        appendShape: function (shape) {\r\n            alert('appendShape not implemented');\r\n        },\r\n\r\n        /**\r\n         * Replace one shape with another\r\n         */\r\n        replaceWithShape: function (shapeid, shape) {\r\n            alert('replaceWithShape not implemented');\r\n        },\r\n\r\n        /**\r\n         * Insert one shape after another in the render queue\r\n         */\r\n        insertAfterShape: function (shapeid, shape) {\r\n            alert('insertAfterShape not implemented');\r\n        },\r\n\r\n        /**\r\n         * Remove a shape from the queue\r\n         */\r\n        removeShapeId: function (shapeid) {\r\n            alert('removeShapeId not implemented');\r\n        },\r\n\r\n        /**\r\n         * Find a shape at the specified x/y co-ordinates\r\n         */\r\n        getShapeAt: function (el, x, y) {\r\n            alert('getShapeAt not implemented');\r\n        },\r\n\r\n        /**\r\n         * Render all queued shapes onto the canvas\r\n         */\r\n        render: function () {\r\n            alert('render not implemented');\r\n        }\r\n    });\r\n\r\n    VCanvas_canvas = createClass(VCanvas_base, {\r\n        init: function (width, height, target, interact) {\r\n            VCanvas_canvas._super.init.call(this, width, height, target);\r\n            this.canvas = document.createElement('canvas');\r\n            if (target[0]) {\r\n                target = target[0];\r\n            }\r\n            $.data(target, '_jqs_vcanvas', this);\r\n            $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' });\r\n            this._insert(this.canvas, target);\r\n            this._calculatePixelDims(width, height, this.canvas);\r\n            this.canvas.width = this.pixelWidth;\r\n            this.canvas.height = this.pixelHeight;\r\n            this.interact = interact;\r\n            this.shapes = {};\r\n            this.shapeseq = [];\r\n            this.currentTargetShapeId = undefined;\r\n            $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight});\r\n        },\r\n\r\n        _getContext: function (lineColor, fillColor, lineWidth) {\r\n            var context = this.canvas.getContext('2d');\r\n            if (lineColor !== undefined) {\r\n                context.strokeStyle = lineColor;\r\n            }\r\n            context.lineWidth = lineWidth === undefined ? 1 : lineWidth;\r\n            if (fillColor !== undefined) {\r\n                context.fillStyle = fillColor;\r\n            }\r\n            return context;\r\n        },\r\n\r\n        reset: function () {\r\n            var context = this._getContext();\r\n            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);\r\n            this.shapes = {};\r\n            this.shapeseq = [];\r\n            this.currentTargetShapeId = undefined;\r\n        },\r\n\r\n        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {\r\n            var context = this._getContext(lineColor, fillColor, lineWidth),\r\n                i, plen;\r\n            context.beginPath();\r\n            context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);\r\n            for (i = 1, plen = path.length; i < plen; i++) {\r\n                context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines\r\n            }\r\n            if (lineColor !== undefined) {\r\n                context.stroke();\r\n            }\r\n            if (fillColor !== undefined) {\r\n                context.fill();\r\n            }\r\n            if (this.targetX !== undefined && this.targetY !== undefined &&\r\n                context.isPointInPath(this.targetX, this.targetY)) {\r\n                this.currentTargetShapeId = shapeid;\r\n            }\r\n        },\r\n\r\n        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {\r\n            var context = this._getContext(lineColor, fillColor, lineWidth);\r\n            context.beginPath();\r\n            context.arc(x, y, radius, 0, 2 * Math.PI, false);\r\n            if (this.targetX !== undefined && this.targetY !== undefined &&\r\n                context.isPointInPath(this.targetX, this.targetY)) {\r\n                this.currentTargetShapeId = shapeid;\r\n            }\r\n            if (lineColor !== undefined) {\r\n                context.stroke();\r\n            }\r\n            if (fillColor !== undefined) {\r\n                context.fill();\r\n            }\r\n        },\r\n\r\n        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {\r\n            var context = this._getContext(lineColor, fillColor);\r\n            context.beginPath();\r\n            context.moveTo(x, y);\r\n            context.arc(x, y, radius, startAngle, endAngle, false);\r\n            context.lineTo(x, y);\r\n            context.closePath();\r\n            if (lineColor !== undefined) {\r\n                context.stroke();\r\n            }\r\n            if (fillColor) {\r\n                context.fill();\r\n            }\r\n            if (this.targetX !== undefined && this.targetY !== undefined &&\r\n                context.isPointInPath(this.targetX, this.targetY)) {\r\n                this.currentTargetShapeId = shapeid;\r\n            }\r\n        },\r\n\r\n        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {\r\n            return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor);\r\n        },\r\n\r\n        appendShape: function (shape) {\r\n            this.shapes[shape.id] = shape;\r\n            this.shapeseq.push(shape.id);\r\n            this.lastShapeId = shape.id;\r\n            return shape.id;\r\n        },\r\n\r\n        replaceWithShape: function (shapeid, shape) {\r\n            var shapeseq = this.shapeseq,\r\n                i;\r\n            this.shapes[shape.id] = shape;\r\n            for (i = shapeseq.length; i--;) {\r\n                if (shapeseq[i] == shapeid) {\r\n                    shapeseq[i] = shape.id;\r\n                }\r\n            }\r\n            delete this.shapes[shapeid];\r\n        },\r\n\r\n        replaceWithShapes: function (shapeids, shapes) {\r\n            var shapeseq = this.shapeseq,\r\n                shapemap = {},\r\n                sid, i, first;\r\n\r\n            for (i = shapeids.length; i--;) {\r\n                shapemap[shapeids[i]] = true;\r\n            }\r\n            for (i = shapeseq.length; i--;) {\r\n                sid = shapeseq[i];\r\n                if (shapemap[sid]) {\r\n                    shapeseq.splice(i, 1);\r\n                    delete this.shapes[sid];\r\n                    first = i;\r\n                }\r\n            }\r\n            for (i = shapes.length; i--;) {\r\n                shapeseq.splice(first, 0, shapes[i].id);\r\n                this.shapes[shapes[i].id] = shapes[i];\r\n            }\r\n\r\n        },\r\n\r\n        insertAfterShape: function (shapeid, shape) {\r\n            var shapeseq = this.shapeseq,\r\n                i;\r\n            for (i = shapeseq.length; i--;) {\r\n                if (shapeseq[i] === shapeid) {\r\n                    shapeseq.splice(i + 1, 0, shape.id);\r\n                    this.shapes[shape.id] = shape;\r\n                    return;\r\n                }\r\n            }\r\n        },\r\n\r\n        removeShapeId: function (shapeid) {\r\n            var shapeseq = this.shapeseq,\r\n                i;\r\n            for (i = shapeseq.length; i--;) {\r\n                if (shapeseq[i] === shapeid) {\r\n                    shapeseq.splice(i, 1);\r\n                    break;\r\n                }\r\n            }\r\n            delete this.shapes[shapeid];\r\n        },\r\n\r\n        getShapeAt: function (el, x, y) {\r\n            this.targetX = x;\r\n            this.targetY = y;\r\n            this.render();\r\n            return this.currentTargetShapeId;\r\n        },\r\n\r\n        render: function () {\r\n            var shapeseq = this.shapeseq,\r\n                shapes = this.shapes,\r\n                shapeCount = shapeseq.length,\r\n                context = this._getContext(),\r\n                shapeid, shape, i;\r\n            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);\r\n            for (i = 0; i < shapeCount; i++) {\r\n                shapeid = shapeseq[i];\r\n                shape = shapes[shapeid];\r\n                this['_draw' + shape.type].apply(this, shape.args);\r\n            }\r\n            if (!this.interact) {\r\n                // not interactive so no need to keep the shapes array\r\n                this.shapes = {};\r\n                this.shapeseq = [];\r\n            }\r\n        }\r\n\r\n    });\r\n\r\n    VCanvas_vml = createClass(VCanvas_base, {\r\n        init: function (width, height, target) {\r\n            var groupel;\r\n            VCanvas_vml._super.init.call(this, width, height, target);\r\n            if (target[0]) {\r\n                target = target[0];\r\n            }\r\n            $.data(target, '_jqs_vcanvas', this);\r\n            this.canvas = document.createElement('span');\r\n            $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'});\r\n            this._insert(this.canvas, target);\r\n            this._calculatePixelDims(width, height, this.canvas);\r\n            this.canvas.width = this.pixelWidth;\r\n            this.canvas.height = this.pixelHeight;\r\n            groupel = '<v:group coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\"' +\r\n                    ' style=\"position:absolute;top:0;left:0;width:' + this.pixelWidth + 'px;height=' + this.pixelHeight + 'px;\"></v:group>';\r\n            this.canvas.insertAdjacentHTML('beforeEnd', groupel);\r\n            this.group = $(this.canvas).children()[0];\r\n            this.rendered = false;\r\n            this.prerender = '';\r\n        },\r\n\r\n        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {\r\n            var vpath = [],\r\n                initial, stroke, fill, closed, vel, plen, i;\r\n            for (i = 0, plen = path.length; i < plen; i++) {\r\n                vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]);\r\n            }\r\n            initial = vpath.splice(0, 1);\r\n            lineWidth = lineWidth === undefined ? 1 : lineWidth;\r\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"' + lineWidth + 'px\" strokeColor=\"' + lineColor + '\" ';\r\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\r\n            closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : '';\r\n            vel = '<v:shape coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\" ' +\r\n                 ' id=\"jqsshape' + shapeid + '\" ' +\r\n                 stroke +\r\n                 fill +\r\n                ' style=\"position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;\" ' +\r\n                ' path=\"m ' + initial + ' l ' + vpath.join(', ') + ' ' + closed + 'e\">' +\r\n                ' </v:shape>';\r\n            return vel;\r\n        },\r\n\r\n        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {\r\n            var stroke, fill, vel;\r\n            x -= radius;\r\n            y -= radius;\r\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"' + lineWidth + 'px\" strokeColor=\"' + lineColor + '\" ';\r\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\r\n            vel = '<v:oval ' +\r\n                 ' id=\"jqsshape' + shapeid + '\" ' +\r\n                stroke +\r\n                fill +\r\n                ' style=\"position:absolute;top:' + y + 'px; left:' + x + 'px; width:' + (radius * 2) + 'px; height:' + (radius * 2) + 'px\"></v:oval>';\r\n            return vel;\r\n\r\n        },\r\n\r\n        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {\r\n            var vpath, startx, starty, endx, endy, stroke, fill, vel;\r\n            if (startAngle === endAngle) {\r\n                return '';  // VML seems to have problem when start angle equals end angle.\r\n            }\r\n            if ((endAngle - startAngle) === (2 * Math.PI)) {\r\n                startAngle = 0.0;  // VML seems to have a problem when drawing a full circle that doesn't start 0\r\n                endAngle = (2 * Math.PI);\r\n            }\r\n\r\n            startx = x + Math.round(Math.cos(startAngle) * radius);\r\n            starty = y + Math.round(Math.sin(startAngle) * radius);\r\n            endx = x + Math.round(Math.cos(endAngle) * radius);\r\n            endy = y + Math.round(Math.sin(endAngle) * radius);\r\n\r\n            if (startx === endx && starty === endy) {\r\n                if ((endAngle - startAngle) < Math.PI) {\r\n                    // Prevent very small slices from being mistaken as a whole pie\r\n                    return '';\r\n                }\r\n                // essentially going to be the entire circle, so ignore startAngle\r\n                startx = endx = x + radius;\r\n                starty = endy = y;\r\n            }\r\n\r\n            if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) {\r\n                return '';\r\n            }\r\n\r\n            vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy];\r\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"1px\" strokeColor=\"' + lineColor + '\" ';\r\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\r\n            vel = '<v:shape coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\" ' +\r\n                 ' id=\"jqsshape' + shapeid + '\" ' +\r\n                 stroke +\r\n                 fill +\r\n                ' style=\"position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;\" ' +\r\n                ' path=\"m ' + x + ',' + y + ' wa ' + vpath.join(', ') + ' x e\">' +\r\n                ' </v:shape>';\r\n            return vel;\r\n        },\r\n\r\n        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {\r\n            return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor);\r\n        },\r\n\r\n        reset: function () {\r\n            this.group.innerHTML = '';\r\n        },\r\n\r\n        appendShape: function (shape) {\r\n            var vel = this['_draw' + shape.type].apply(this, shape.args);\r\n            if (this.rendered) {\r\n                this.group.insertAdjacentHTML('beforeEnd', vel);\r\n            } else {\r\n                this.prerender += vel;\r\n            }\r\n            this.lastShapeId = shape.id;\r\n            return shape.id;\r\n        },\r\n\r\n        replaceWithShape: function (shapeid, shape) {\r\n            var existing = $('#jqsshape' + shapeid),\r\n                vel = this['_draw' + shape.type].apply(this, shape.args);\r\n            existing[0].outerHTML = vel;\r\n        },\r\n\r\n        replaceWithShapes: function (shapeids, shapes) {\r\n            // replace the first shapeid with all the new shapes then toast the remaining old shapes\r\n            var existing = $('#jqsshape' + shapeids[0]),\r\n                replace = '',\r\n                slen = shapes.length,\r\n                i;\r\n            for (i = 0; i < slen; i++) {\r\n                replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args);\r\n            }\r\n            existing[0].outerHTML = replace;\r\n            for (i = 1; i < shapeids.length; i++) {\r\n                $('#jqsshape' + shapeids[i]).remove();\r\n            }\r\n        },\r\n\r\n        insertAfterShape: function (shapeid, shape) {\r\n            var existing = $('#jqsshape' + shapeid),\r\n                 vel = this['_draw' + shape.type].apply(this, shape.args);\r\n            existing[0].insertAdjacentHTML('afterEnd', vel);\r\n        },\r\n\r\n        removeShapeId: function (shapeid) {\r\n            var existing = $('#jqsshape' + shapeid);\r\n            this.group.removeChild(existing[0]);\r\n        },\r\n\r\n        getShapeAt: function (el, x, y) {\r\n            var shapeid = el.id.substr(8);\r\n            return shapeid;\r\n        },\r\n\r\n        render: function () {\r\n            if (!this.rendered) {\r\n                // batch the intial render into a single repaint\r\n                this.group.innerHTML = this.prerender;\r\n                this.rendered = true;\r\n            }\r\n        }\r\n    });\r\n\r\n}))}(document, Math));"

/***/ },

/***/ 762:
/***/ function(module, exports) {

module.exports = "/*! tether 1.3.8 */\n\n(function(root, factory) {\n  if (typeof define === 'function' && define.amd) {\n    define(factory);\n  } else if (typeof exports === 'object') {\n    module.exports = factory(require, exports, module);\n  } else {\n    root.Tether = factory();\n  }\n}(this, function(require, exports, module) {\n\n'use strict';\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar TetherBase = undefined;\nif (typeof TetherBase === 'undefined') {\n  TetherBase = { modules: [] };\n}\n\nvar zeroElement = null;\n\n// Same as native getBoundingClientRect, except it takes into account parent <frame> offsets\n// if the element lies within a nested document (<frame> or <iframe>-like).\nfunction getActualBoundingClientRect(node) {\n  var boundingRect = node.getBoundingClientRect();\n\n  // The original object returned by getBoundingClientRect is immutable, so we clone it\n  // We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9\n  var rect = {};\n  for (var k in boundingRect) {\n    rect[k] = boundingRect[k];\n  }\n\n  if (node.ownerDocument !== document) {\n    var _frameElement = node.ownerDocument.defaultView.frameElement;\n    if (_frameElement) {\n      var frameRect = getActualBoundingClientRect(_frameElement);\n      rect.top += frameRect.top;\n      rect.bottom += frameRect.top;\n      rect.left += frameRect.left;\n      rect.right += frameRect.left;\n    }\n  }\n\n  return rect;\n}\n\nfunction getScrollParents(el) {\n  // In firefox if the el is inside an iframe with display: none; window.getComputedStyle() will return null;\n  // https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n  var computedStyle = getComputedStyle(el) || {};\n  var position = computedStyle.position;\n  var parents = [];\n\n  if (position === 'fixed') {\n    return [el];\n  }\n\n  var parent = el;\n  while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {\n    var style = undefined;\n    try {\n      style = getComputedStyle(parent);\n    } catch (err) {}\n\n    if (typeof style === 'undefined' || style === null) {\n      parents.push(parent);\n      return parents;\n    }\n\n    var _style = style;\n    var overflow = _style.overflow;\n    var overflowX = _style.overflowX;\n    var overflowY = _style.overflowY;\n\n    if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {\n      if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {\n        parents.push(parent);\n      }\n    }\n  }\n\n  parents.push(el.ownerDocument.body);\n\n  // If the node is within a frame, account for the parent window scroll\n  if (el.ownerDocument !== document) {\n    parents.push(el.ownerDocument.defaultView);\n  }\n\n  return parents;\n}\n\nvar uniqueId = (function () {\n  var id = 0;\n  return function () {\n    return ++id;\n  };\n})();\n\nvar zeroPosCache = {};\nvar getOrigin = function getOrigin() {\n  // getBoundingClientRect is unfortunately too accurate.  It introduces a pixel or two of\n  // jitter as the user scrolls that messes with our ability to detect if two positions\n  // are equivilant or not.  We place an element at the top left of the page that will\n  // get the same jitter, so we can cancel the two out.\n  var node = zeroElement;\n  if (!node || !document.body.contains(node)) {\n    node = document.createElement('div');\n    node.setAttribute('data-tether-id', uniqueId());\n    extend(node.style, {\n      top: 0,\n      left: 0,\n      position: 'absolute'\n    });\n\n    document.body.appendChild(node);\n\n    zeroElement = node;\n  }\n\n  var id = node.getAttribute('data-tether-id');\n  if (typeof zeroPosCache[id] === 'undefined') {\n    zeroPosCache[id] = getActualBoundingClientRect(node);\n\n    // Clear the cache when this position call is done\n    defer(function () {\n      delete zeroPosCache[id];\n    });\n  }\n\n  return zeroPosCache[id];\n};\n\nfunction removeUtilElements() {\n  if (zeroElement) {\n    document.body.removeChild(zeroElement);\n  }\n  zeroElement = null;\n};\n\nfunction getBounds(el) {\n  var doc = undefined;\n  if (el === document) {\n    doc = document;\n    el = document.documentElement;\n  } else {\n    doc = el.ownerDocument;\n  }\n\n  var docEl = doc.documentElement;\n\n  var box = getActualBoundingClientRect(el);\n\n  var origin = getOrigin();\n\n  box.top -= origin.top;\n  box.left -= origin.left;\n\n  if (typeof box.width === 'undefined') {\n    box.width = document.body.scrollWidth - box.left - box.right;\n  }\n  if (typeof box.height === 'undefined') {\n    box.height = document.body.scrollHeight - box.top - box.bottom;\n  }\n\n  box.top = box.top - docEl.clientTop;\n  box.left = box.left - docEl.clientLeft;\n  box.right = doc.body.clientWidth - box.width - box.left;\n  box.bottom = doc.body.clientHeight - box.height - box.top;\n\n  return box;\n}\n\nfunction getOffsetParent(el) {\n  return el.offsetParent || document.documentElement;\n}\n\nvar _scrollBarSize = null;\nfunction getScrollBarSize() {\n  if (_scrollBarSize) {\n    return _scrollBarSize;\n  }\n  var inner = document.createElement('div');\n  inner.style.width = '100%';\n  inner.style.height = '200px';\n\n  var outer = document.createElement('div');\n  extend(outer.style, {\n    position: 'absolute',\n    top: 0,\n    left: 0,\n    pointerEvents: 'none',\n    visibility: 'hidden',\n    width: '200px',\n    height: '150px',\n    overflow: 'hidden'\n  });\n\n  outer.appendChild(inner);\n\n  document.body.appendChild(outer);\n\n  var widthContained = inner.offsetWidth;\n  outer.style.overflow = 'scroll';\n  var widthScroll = inner.offsetWidth;\n\n  if (widthContained === widthScroll) {\n    widthScroll = outer.clientWidth;\n  }\n\n  document.body.removeChild(outer);\n\n  var width = widthContained - widthScroll;\n\n  _scrollBarSize = { width: width, height: width };\n  return _scrollBarSize;\n}\n\nfunction extend() {\n  var out = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n  var args = [];\n\n  Array.prototype.push.apply(args, arguments);\n\n  args.slice(1).forEach(function (obj) {\n    if (obj) {\n      for (var key in obj) {\n        if (({}).hasOwnProperty.call(obj, key)) {\n          out[key] = obj[key];\n        }\n      }\n    }\n  });\n\n  return out;\n}\n\nfunction removeClass(el, name) {\n  if (typeof el.classList !== 'undefined') {\n    name.split(' ').forEach(function (cls) {\n      if (cls.trim()) {\n        el.classList.remove(cls);\n      }\n    });\n  } else {\n    var regex = new RegExp('(^| )' + name.split(' ').join('|') + '( |$)', 'gi');\n    var className = getClassName(el).replace(regex, ' ');\n    setClassName(el, className);\n  }\n}\n\nfunction addClass(el, name) {\n  if (typeof el.classList !== 'undefined') {\n    name.split(' ').forEach(function (cls) {\n      if (cls.trim()) {\n        el.classList.add(cls);\n      }\n    });\n  } else {\n    removeClass(el, name);\n    var cls = getClassName(el) + (' ' + name);\n    setClassName(el, cls);\n  }\n}\n\nfunction hasClass(el, name) {\n  if (typeof el.classList !== 'undefined') {\n    return el.classList.contains(name);\n  }\n  var className = getClassName(el);\n  return new RegExp('(^| )' + name + '( |$)', 'gi').test(className);\n}\n\nfunction getClassName(el) {\n  // Can't use just SVGAnimatedString here since nodes within a Frame in IE have\n  // completely separately SVGAnimatedString base classes\n  if (el.className instanceof el.ownerDocument.defaultView.SVGAnimatedString) {\n    return el.className.baseVal;\n  }\n  return el.className;\n}\n\nfunction setClassName(el, className) {\n  el.setAttribute('class', className);\n}\n\nfunction updateClasses(el, add, all) {\n  // Of the set of 'all' classes, we need the 'add' classes, and only the\n  // 'add' classes to be set.\n  all.forEach(function (cls) {\n    if (add.indexOf(cls) === -1 && hasClass(el, cls)) {\n      removeClass(el, cls);\n    }\n  });\n\n  add.forEach(function (cls) {\n    if (!hasClass(el, cls)) {\n      addClass(el, cls);\n    }\n  });\n}\n\nvar deferred = [];\n\nvar defer = function defer(fn) {\n  deferred.push(fn);\n};\n\nvar flush = function flush() {\n  var fn = undefined;\n  while (fn = deferred.pop()) {\n    fn();\n  }\n};\n\nvar Evented = (function () {\n  function Evented() {\n    _classCallCheck(this, Evented);\n  }\n\n  _createClass(Evented, [{\n    key: 'on',\n    value: function on(event, handler, ctx) {\n      var once = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];\n\n      if (typeof this.bindings === 'undefined') {\n        this.bindings = {};\n      }\n      if (typeof this.bindings[event] === 'undefined') {\n        this.bindings[event] = [];\n      }\n      this.bindings[event].push({ handler: handler, ctx: ctx, once: once });\n    }\n  }, {\n    key: 'once',\n    value: function once(event, handler, ctx) {\n      this.on(event, handler, ctx, true);\n    }\n  }, {\n    key: 'off',\n    value: function off(event, handler) {\n      if (typeof this.bindings === 'undefined' || typeof this.bindings[event] === 'undefined') {\n        return;\n      }\n\n      if (typeof handler === 'undefined') {\n        delete this.bindings[event];\n      } else {\n        var i = 0;\n        while (i < this.bindings[event].length) {\n          if (this.bindings[event][i].handler === handler) {\n            this.bindings[event].splice(i, 1);\n          } else {\n            ++i;\n          }\n        }\n      }\n    }\n  }, {\n    key: 'trigger',\n    value: function trigger(event) {\n      if (typeof this.bindings !== 'undefined' && this.bindings[event]) {\n        var i = 0;\n\n        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n          args[_key - 1] = arguments[_key];\n        }\n\n        while (i < this.bindings[event].length) {\n          var _bindings$event$i = this.bindings[event][i];\n          var handler = _bindings$event$i.handler;\n          var ctx = _bindings$event$i.ctx;\n          var once = _bindings$event$i.once;\n\n          var context = ctx;\n          if (typeof context === 'undefined') {\n            context = this;\n          }\n\n          handler.apply(context, args);\n\n          if (once) {\n            this.bindings[event].splice(i, 1);\n          } else {\n            ++i;\n          }\n        }\n      }\n    }\n  }]);\n\n  return Evented;\n})();\n\nTetherBase.Utils = {\n  getActualBoundingClientRect: getActualBoundingClientRect,\n  getScrollParents: getScrollParents,\n  getBounds: getBounds,\n  getOffsetParent: getOffsetParent,\n  extend: extend,\n  addClass: addClass,\n  removeClass: removeClass,\n  hasClass: hasClass,\n  updateClasses: updateClasses,\n  defer: defer,\n  flush: flush,\n  uniqueId: uniqueId,\n  Evented: Evented,\n  getScrollBarSize: getScrollBarSize,\n  removeUtilElements: removeUtilElements\n};\n/* globals TetherBase, performance */\n\n'use strict';\n\nvar _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x6, _x7, _x8) { var _again = true; _function: while (_again) { var object = _x6, property = _x7, receiver = _x8; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x6 = parent; _x7 = property; _x8 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nif (typeof TetherBase === 'undefined') {\n  throw new Error('You must include the utils.js file before tether.js');\n}\n\nvar _TetherBase$Utils = TetherBase.Utils;\nvar getScrollParents = _TetherBase$Utils.getScrollParents;\nvar getBounds = _TetherBase$Utils.getBounds;\nvar getOffsetParent = _TetherBase$Utils.getOffsetParent;\nvar extend = _TetherBase$Utils.extend;\nvar addClass = _TetherBase$Utils.addClass;\nvar removeClass = _TetherBase$Utils.removeClass;\nvar updateClasses = _TetherBase$Utils.updateClasses;\nvar defer = _TetherBase$Utils.defer;\nvar flush = _TetherBase$Utils.flush;\nvar getScrollBarSize = _TetherBase$Utils.getScrollBarSize;\nvar removeUtilElements = _TetherBase$Utils.removeUtilElements;\n\nfunction within(a, b) {\n  var diff = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];\n\n  return a + diff >= b && b >= a - diff;\n}\n\nvar transformKey = (function () {\n  if (typeof document === 'undefined') {\n    return '';\n  }\n  var el = document.createElement('div');\n\n  var transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];\n  for (var i = 0; i < transforms.length; ++i) {\n    var key = transforms[i];\n    if (el.style[key] !== undefined) {\n      return key;\n    }\n  }\n})();\n\nvar tethers = [];\n\nvar position = function position() {\n  tethers.forEach(function (tether) {\n    tether.position(false);\n  });\n  flush();\n};\n\nfunction now() {\n  if (typeof performance !== 'undefined' && typeof performance.now !== 'undefined') {\n    return performance.now();\n  }\n  return +new Date();\n}\n\n(function () {\n  var lastCall = null;\n  var lastDuration = null;\n  var pendingTimeout = null;\n\n  var tick = function tick() {\n    if (typeof lastDuration !== 'undefined' && lastDuration > 16) {\n      // We voluntarily throttle ourselves if we can't manage 60fps\n      lastDuration = Math.min(lastDuration - 16, 250);\n\n      // Just in case this is the last event, remember to position just once more\n      pendingTimeout = setTimeout(tick, 250);\n      return;\n    }\n\n    if (typeof lastCall !== 'undefined' && now() - lastCall < 10) {\n      // Some browsers call events a little too frequently, refuse to run more than is reasonable\n      return;\n    }\n\n    if (pendingTimeout != null) {\n      clearTimeout(pendingTimeout);\n      pendingTimeout = null;\n    }\n\n    lastCall = now();\n    position();\n    lastDuration = now() - lastCall;\n  };\n\n  if (typeof window !== 'undefined' && typeof window.addEventListener !== 'undefined') {\n    ['resize', 'scroll', 'touchmove'].forEach(function (event) {\n      window.addEventListener(event, tick);\n    });\n  }\n})();\n\nvar MIRROR_LR = {\n  center: 'center',\n  left: 'right',\n  right: 'left'\n};\n\nvar MIRROR_TB = {\n  middle: 'middle',\n  top: 'bottom',\n  bottom: 'top'\n};\n\nvar OFFSET_MAP = {\n  top: 0,\n  left: 0,\n  middle: '50%',\n  center: '50%',\n  bottom: '100%',\n  right: '100%'\n};\n\nvar autoToFixedAttachment = function autoToFixedAttachment(attachment, relativeToAttachment) {\n  var left = attachment.left;\n  var top = attachment.top;\n\n  if (left === 'auto') {\n    left = MIRROR_LR[relativeToAttachment.left];\n  }\n\n  if (top === 'auto') {\n    top = MIRROR_TB[relativeToAttachment.top];\n  }\n\n  return { left: left, top: top };\n};\n\nvar attachmentToOffset = function attachmentToOffset(attachment) {\n  var left = attachment.left;\n  var top = attachment.top;\n\n  if (typeof OFFSET_MAP[attachment.left] !== 'undefined') {\n    left = OFFSET_MAP[attachment.left];\n  }\n\n  if (typeof OFFSET_MAP[attachment.top] !== 'undefined') {\n    top = OFFSET_MAP[attachment.top];\n  }\n\n  return { left: left, top: top };\n};\n\nfunction addOffset() {\n  var out = { top: 0, left: 0 };\n\n  for (var _len = arguments.length, offsets = Array(_len), _key = 0; _key < _len; _key++) {\n    offsets[_key] = arguments[_key];\n  }\n\n  offsets.forEach(function (_ref) {\n    var top = _ref.top;\n    var left = _ref.left;\n\n    if (typeof top === 'string') {\n      top = parseFloat(top, 10);\n    }\n    if (typeof left === 'string') {\n      left = parseFloat(left, 10);\n    }\n\n    out.top += top;\n    out.left += left;\n  });\n\n  return out;\n}\n\nfunction offsetToPx(offset, size) {\n  if (typeof offset.left === 'string' && offset.left.indexOf('%') !== -1) {\n    offset.left = parseFloat(offset.left, 10) / 100 * size.width;\n  }\n  if (typeof offset.top === 'string' && offset.top.indexOf('%') !== -1) {\n    offset.top = parseFloat(offset.top, 10) / 100 * size.height;\n  }\n\n  return offset;\n}\n\nvar parseOffset = function parseOffset(value) {\n  var _value$split = value.split(' ');\n\n  var _value$split2 = _slicedToArray(_value$split, 2);\n\n  var top = _value$split2[0];\n  var left = _value$split2[1];\n\n  return { top: top, left: left };\n};\nvar parseAttachment = parseOffset;\n\nvar TetherClass = (function (_Evented) {\n  _inherits(TetherClass, _Evented);\n\n  function TetherClass(options) {\n    var _this = this;\n\n    _classCallCheck(this, TetherClass);\n\n    _get(Object.getPrototypeOf(TetherClass.prototype), 'constructor', this).call(this);\n    this.position = this.position.bind(this);\n\n    tethers.push(this);\n\n    this.history = [];\n\n    this.setOptions(options, false);\n\n    TetherBase.modules.forEach(function (module) {\n      if (typeof module.initialize !== 'undefined') {\n        module.initialize.call(_this);\n      }\n    });\n\n    this.position();\n  }\n\n  _createClass(TetherClass, [{\n    key: 'getClass',\n    value: function getClass() {\n      var key = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];\n      var classes = this.options.classes;\n\n      if (typeof classes !== 'undefined' && classes[key]) {\n        return this.options.classes[key];\n      } else if (this.options.classPrefix) {\n        return this.options.classPrefix + '-' + key;\n      } else {\n        return key;\n      }\n    }\n  }, {\n    key: 'setOptions',\n    value: function setOptions(options) {\n      var _this2 = this;\n\n      var pos = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];\n\n      var defaults = {\n        offset: '0 0',\n        targetOffset: '0 0',\n        targetAttachment: 'auto auto',\n        classPrefix: 'tether'\n      };\n\n      this.options = extend(defaults, options);\n\n      var _options = this.options;\n      var element = _options.element;\n      var target = _options.target;\n      var targetModifier = _options.targetModifier;\n\n      this.element = element;\n      this.target = target;\n      this.targetModifier = targetModifier;\n\n      if (this.target === 'viewport') {\n        this.target = document.body;\n        this.targetModifier = 'visible';\n      } else if (this.target === 'scroll-handle') {\n        this.target = document.body;\n        this.targetModifier = 'scroll-handle';\n      }\n\n      ['element', 'target'].forEach(function (key) {\n        if (typeof _this2[key] === 'undefined') {\n          throw new Error('Tether Error: Both element and target must be defined');\n        }\n\n        if (typeof _this2[key].jquery !== 'undefined') {\n          _this2[key] = _this2[key][0];\n        } else if (typeof _this2[key] === 'string') {\n          _this2[key] = document.querySelector(_this2[key]);\n        }\n      });\n\n      addClass(this.element, this.getClass('element'));\n      if (!(this.options.addTargetClasses === false)) {\n        addClass(this.target, this.getClass('target'));\n      }\n\n      if (!this.options.attachment) {\n        throw new Error('Tether Error: You must provide an attachment');\n      }\n\n      this.targetAttachment = parseAttachment(this.options.targetAttachment);\n      this.attachment = parseAttachment(this.options.attachment);\n      this.offset = parseOffset(this.options.offset);\n      this.targetOffset = parseOffset(this.options.targetOffset);\n\n      if (typeof this.scrollParents !== 'undefined') {\n        this.disable();\n      }\n\n      if (this.targetModifier === 'scroll-handle') {\n        this.scrollParents = [this.target];\n      } else {\n        this.scrollParents = getScrollParents(this.target);\n      }\n\n      if (!(this.options.enabled === false)) {\n        this.enable(pos);\n      }\n    }\n  }, {\n    key: 'getTargetBounds',\n    value: function getTargetBounds() {\n      if (typeof this.targetModifier !== 'undefined') {\n        if (this.targetModifier === 'visible') {\n          if (this.target === document.body) {\n            return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth };\n          } else {\n            var bounds = getBounds(this.target);\n\n            var out = {\n              height: bounds.height,\n              width: bounds.width,\n              top: bounds.top,\n              left: bounds.left\n            };\n\n            out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));\n            out.height = Math.min(out.height, bounds.height - (bounds.top + bounds.height - (pageYOffset + innerHeight)));\n            out.height = Math.min(innerHeight, out.height);\n            out.height -= 2;\n\n            out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));\n            out.width = Math.min(out.width, bounds.width - (bounds.left + bounds.width - (pageXOffset + innerWidth)));\n            out.width = Math.min(innerWidth, out.width);\n            out.width -= 2;\n\n            if (out.top < pageYOffset) {\n              out.top = pageYOffset;\n            }\n            if (out.left < pageXOffset) {\n              out.left = pageXOffset;\n            }\n\n            return out;\n          }\n        } else if (this.targetModifier === 'scroll-handle') {\n          var bounds = undefined;\n          var target = this.target;\n          if (target === document.body) {\n            target = document.documentElement;\n\n            bounds = {\n              left: pageXOffset,\n              top: pageYOffset,\n              height: innerHeight,\n              width: innerWidth\n            };\n          } else {\n            bounds = getBounds(target);\n          }\n\n          var style = getComputedStyle(target);\n\n          var hasBottomScroll = target.scrollWidth > target.clientWidth || [style.overflow, style.overflowX].indexOf('scroll') >= 0 || this.target !== document.body;\n\n          var scrollBottom = 0;\n          if (hasBottomScroll) {\n            scrollBottom = 15;\n          }\n\n          var height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;\n\n          var out = {\n            width: 15,\n            height: height * 0.975 * (height / target.scrollHeight),\n            left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15\n          };\n\n          var fitAdj = 0;\n          if (height < 408 && this.target === document.body) {\n            fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;\n          }\n\n          if (this.target !== document.body) {\n            out.height = Math.max(out.height, 24);\n          }\n\n          var scrollPercentage = this.target.scrollTop / (target.scrollHeight - height);\n          out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);\n\n          if (this.target === document.body) {\n            out.height = Math.max(out.height, 24);\n          }\n\n          return out;\n        }\n      } else {\n        return getBounds(this.target);\n      }\n    }\n  }, {\n    key: 'clearCache',\n    value: function clearCache() {\n      this._cache = {};\n    }\n  }, {\n    key: 'cache',\n    value: function cache(k, getter) {\n      // More than one module will often need the same DOM info, so\n      // we keep a cache which is cleared on each position call\n      if (typeof this._cache === 'undefined') {\n        this._cache = {};\n      }\n\n      if (typeof this._cache[k] === 'undefined') {\n        this._cache[k] = getter.call(this);\n      }\n\n      return this._cache[k];\n    }\n  }, {\n    key: 'enable',\n    value: function enable() {\n      var _this3 = this;\n\n      var pos = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n\n      if (!(this.options.addTargetClasses === false)) {\n        addClass(this.target, this.getClass('enabled'));\n      }\n      addClass(this.element, this.getClass('enabled'));\n      this.enabled = true;\n\n      this.scrollParents.forEach(function (parent) {\n        if (parent !== _this3.target.ownerDocument) {\n          parent.addEventListener('scroll', _this3.position);\n        }\n      });\n\n      if (pos) {\n        this.position();\n      }\n    }\n  }, {\n    key: 'disable',\n    value: function disable() {\n      var _this4 = this;\n\n      removeClass(this.target, this.getClass('enabled'));\n      removeClass(this.element, this.getClass('enabled'));\n      this.enabled = false;\n\n      if (typeof this.scrollParents !== 'undefined') {\n        this.scrollParents.forEach(function (parent) {\n          parent.removeEventListener('scroll', _this4.position);\n        });\n      }\n    }\n  }, {\n    key: 'destroy',\n    value: function destroy() {\n      var _this5 = this;\n\n      this.disable();\n\n      tethers.forEach(function (tether, i) {\n        if (tether === _this5) {\n          tethers.splice(i, 1);\n        }\n      });\n\n      // Remove any elements we were using for convenience from the DOM\n      if (tethers.length === 0) {\n        removeUtilElements();\n      }\n    }\n  }, {\n    key: 'updateAttachClasses',\n    value: function updateAttachClasses(elementAttach, targetAttach) {\n      var _this6 = this;\n\n      elementAttach = elementAttach || this.attachment;\n      targetAttach = targetAttach || this.targetAttachment;\n      var sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];\n\n      if (typeof this._addAttachClasses !== 'undefined' && this._addAttachClasses.length) {\n        // updateAttachClasses can be called more than once in a position call, so\n        // we need to clean up after ourselves such that when the last defer gets\n        // ran it doesn't add any extra classes from previous calls.\n        this._addAttachClasses.splice(0, this._addAttachClasses.length);\n      }\n\n      if (typeof this._addAttachClasses === 'undefined') {\n        this._addAttachClasses = [];\n      }\n      var add = this._addAttachClasses;\n\n      if (elementAttach.top) {\n        add.push(this.getClass('element-attached') + '-' + elementAttach.top);\n      }\n      if (elementAttach.left) {\n        add.push(this.getClass('element-attached') + '-' + elementAttach.left);\n      }\n      if (targetAttach.top) {\n        add.push(this.getClass('target-attached') + '-' + targetAttach.top);\n      }\n      if (targetAttach.left) {\n        add.push(this.getClass('target-attached') + '-' + targetAttach.left);\n      }\n\n      var all = [];\n      sides.forEach(function (side) {\n        all.push(_this6.getClass('element-attached') + '-' + side);\n        all.push(_this6.getClass('target-attached') + '-' + side);\n      });\n\n      defer(function () {\n        if (!(typeof _this6._addAttachClasses !== 'undefined')) {\n          return;\n        }\n\n        updateClasses(_this6.element, _this6._addAttachClasses, all);\n        if (!(_this6.options.addTargetClasses === false)) {\n          updateClasses(_this6.target, _this6._addAttachClasses, all);\n        }\n\n        delete _this6._addAttachClasses;\n      });\n    }\n  }, {\n    key: 'position',\n    value: function position() {\n      var _this7 = this;\n\n      var flushChanges = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n\n      // flushChanges commits the changes immediately, leave true unless you are positioning multiple\n      // tethers (in which case call Tether.Utils.flush yourself when you're done)\n\n      if (!this.enabled) {\n        return;\n      }\n\n      this.clearCache();\n\n      // Turn 'auto' attachments into the appropriate corner or edge\n      var targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);\n\n      this.updateAttachClasses(this.attachment, targetAttachment);\n\n      var elementPos = this.cache('element-bounds', function () {\n        return getBounds(_this7.element);\n      });\n\n      var width = elementPos.width;\n      var height = elementPos.height;\n\n      if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {\n        var _lastSize = this.lastSize;\n\n        // We cache the height and width to make it possible to position elements that are\n        // getting hidden.\n        width = _lastSize.width;\n        height = _lastSize.height;\n      } else {\n        this.lastSize = { width: width, height: height };\n      }\n\n      var targetPos = this.cache('target-bounds', function () {\n        return _this7.getTargetBounds();\n      });\n      var targetSize = targetPos;\n\n      // Get an actual px offset from the attachment\n      var offset = offsetToPx(attachmentToOffset(this.attachment), { width: width, height: height });\n      var targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);\n\n      var manualOffset = offsetToPx(this.offset, { width: width, height: height });\n      var manualTargetOffset = offsetToPx(this.targetOffset, targetSize);\n\n      // Add the manually provided offset\n      offset = addOffset(offset, manualOffset);\n      targetOffset = addOffset(targetOffset, manualTargetOffset);\n\n      // It's now our goal to make (element position + offset) == (target position + target offset)\n      var left = targetPos.left + targetOffset.left - offset.left;\n      var top = targetPos.top + targetOffset.top - offset.top;\n\n      for (var i = 0; i < TetherBase.modules.length; ++i) {\n        var _module2 = TetherBase.modules[i];\n        var ret = _module2.position.call(this, {\n          left: left,\n          top: top,\n          targetAttachment: targetAttachment,\n          targetPos: targetPos,\n          elementPos: elementPos,\n          offset: offset,\n          targetOffset: targetOffset,\n          manualOffset: manualOffset,\n          manualTargetOffset: manualTargetOffset,\n          scrollbarSize: scrollbarSize,\n          attachment: this.attachment\n        });\n\n        if (ret === false) {\n          return false;\n        } else if (typeof ret === 'undefined' || typeof ret !== 'object') {\n          continue;\n        } else {\n          top = ret.top;\n          left = ret.left;\n        }\n      }\n\n      // We describe the position three different ways to give the optimizer\n      // a chance to decide the best possible way to position the element\n      // with the fewest repaints.\n      var next = {\n        // It's position relative to the page (absolute positioning when\n        // the element is a child of the body)\n        page: {\n          top: top,\n          left: left\n        },\n\n        // It's position relative to the viewport (fixed positioning)\n        viewport: {\n          top: top - pageYOffset,\n          bottom: pageYOffset - top - height + innerHeight,\n          left: left - pageXOffset,\n          right: pageXOffset - left - width + innerWidth\n        }\n      };\n\n      var doc = this.target.ownerDocument;\n      var win = doc.defaultView;\n\n      var scrollbarSize = undefined;\n      if (win.innerHeight > doc.documentElement.clientHeight) {\n        scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n        next.viewport.bottom -= scrollbarSize.height;\n      }\n\n      if (win.innerWidth > doc.documentElement.clientWidth) {\n        scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n        next.viewport.right -= scrollbarSize.width;\n      }\n\n      if (['', 'static'].indexOf(doc.body.style.position) === -1 || ['', 'static'].indexOf(doc.body.parentElement.style.position) === -1) {\n        // Absolute positioning in the body will be relative to the page, not the 'initial containing block'\n        next.page.bottom = doc.body.scrollHeight - top - height;\n        next.page.right = doc.body.scrollWidth - left - width;\n      }\n\n      if (typeof this.options.optimizations !== 'undefined' && this.options.optimizations.moveElement !== false && !(typeof this.targetModifier !== 'undefined')) {\n        (function () {\n          var offsetParent = _this7.cache('target-offsetparent', function () {\n            return getOffsetParent(_this7.target);\n          });\n          var offsetPosition = _this7.cache('target-offsetparent-bounds', function () {\n            return getBounds(offsetParent);\n          });\n          var offsetParentStyle = getComputedStyle(offsetParent);\n          var offsetParentSize = offsetPosition;\n\n          var offsetBorder = {};\n          ['Top', 'Left', 'Bottom', 'Right'].forEach(function (side) {\n            offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle['border' + side + 'Width']);\n          });\n\n          offsetPosition.right = doc.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;\n          offsetPosition.bottom = doc.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;\n\n          if (next.page.top >= offsetPosition.top + offsetBorder.top && next.page.bottom >= offsetPosition.bottom) {\n            if (next.page.left >= offsetPosition.left + offsetBorder.left && next.page.right >= offsetPosition.right) {\n              // We're within the visible part of the target's scroll parent\n              var scrollTop = offsetParent.scrollTop;\n              var scrollLeft = offsetParent.scrollLeft;\n\n              // It's position relative to the target's offset parent (absolute positioning when\n              // the element is moved to be a child of the target's offset parent).\n              next.offset = {\n                top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,\n                left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left\n              };\n            }\n          }\n        })();\n      }\n\n      // We could also travel up the DOM and try each containing context, rather than only\n      // looking at the body, but we're gonna get diminishing returns.\n\n      this.move(next);\n\n      this.history.unshift(next);\n\n      if (this.history.length > 3) {\n        this.history.pop();\n      }\n\n      if (flushChanges) {\n        flush();\n      }\n\n      return true;\n    }\n\n    // THE ISSUE\n  }, {\n    key: 'move',\n    value: function move(pos) {\n      var _this8 = this;\n\n      if (!(typeof this.element.parentNode !== 'undefined')) {\n        return;\n      }\n\n      var same = {};\n\n      for (var type in pos) {\n        same[type] = {};\n\n        for (var key in pos[type]) {\n          var found = false;\n\n          for (var i = 0; i < this.history.length; ++i) {\n            var point = this.history[i];\n            if (typeof point[type] !== 'undefined' && !within(point[type][key], pos[type][key])) {\n              found = true;\n              break;\n            }\n          }\n\n          if (!found) {\n            same[type][key] = true;\n          }\n        }\n      }\n\n      var css = { top: '', left: '', right: '', bottom: '' };\n\n      var transcribe = function transcribe(_same, _pos) {\n        var hasOptimizations = typeof _this8.options.optimizations !== 'undefined';\n        var gpu = hasOptimizations ? _this8.options.optimizations.gpu : null;\n        if (gpu !== false) {\n          var yPos = undefined,\n              xPos = undefined;\n          if (_same.top) {\n            css.top = 0;\n            yPos = _pos.top;\n          } else {\n            css.bottom = 0;\n            yPos = -_pos.bottom;\n          }\n\n          if (_same.left) {\n            css.left = 0;\n            xPos = _pos.left;\n          } else {\n            css.right = 0;\n            xPos = -_pos.right;\n          }\n\n          if (window.matchMedia) {\n            // HubSpot/tether#207\n            var retina = window.matchMedia('only screen and (min-resolution: 1.3dppx)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches;\n            if (!retina) {\n              xPos = Math.round(xPos);\n              yPos = Math.round(yPos);\n            }\n          }\n\n          css[transformKey] = 'translateX(' + xPos + 'px) translateY(' + yPos + 'px)';\n\n          if (transformKey !== 'msTransform') {\n            // The Z transform will keep this in the GPU (faster, and prevents artifacts),\n            // but IE9 doesn't support 3d transforms and will choke.\n            css[transformKey] += \" translateZ(0)\";\n          }\n        } else {\n          if (_same.top) {\n            css.top = _pos.top + 'px';\n          } else {\n            css.bottom = _pos.bottom + 'px';\n          }\n\n          if (_same.left) {\n            css.left = _pos.left + 'px';\n          } else {\n            css.right = _pos.right + 'px';\n          }\n        }\n      };\n\n      var moved = false;\n      if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {\n        css.position = 'absolute';\n        transcribe(same.page, pos.page);\n      } else if ((same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {\n        css.position = 'fixed';\n        transcribe(same.viewport, pos.viewport);\n      } else if (typeof same.offset !== 'undefined' && same.offset.top && same.offset.left) {\n        (function () {\n          css.position = 'absolute';\n          var offsetParent = _this8.cache('target-offsetparent', function () {\n            return getOffsetParent(_this8.target);\n          });\n\n          if (getOffsetParent(_this8.element) !== offsetParent) {\n            defer(function () {\n              _this8.element.parentNode.removeChild(_this8.element);\n              offsetParent.appendChild(_this8.element);\n            });\n          }\n\n          transcribe(same.offset, pos.offset);\n          moved = true;\n        })();\n      } else {\n        css.position = 'absolute';\n        transcribe({ top: true, left: true }, pos.page);\n      }\n\n      if (!moved) {\n        var offsetParentIsBody = true;\n        var currentNode = this.element.parentNode;\n        while (currentNode && currentNode.nodeType === 1 && currentNode.tagName !== 'BODY') {\n          if (getComputedStyle(currentNode).position !== 'static') {\n            offsetParentIsBody = false;\n            break;\n          }\n\n          currentNode = currentNode.parentNode;\n        }\n\n        if (!offsetParentIsBody) {\n          this.element.parentNode.removeChild(this.element);\n          this.element.ownerDocument.body.appendChild(this.element);\n        }\n      }\n\n      // Any css change will trigger a repaint, so let's avoid one if nothing changed\n      var writeCSS = {};\n      var write = false;\n      for (var key in css) {\n        var val = css[key];\n        var elVal = this.element.style[key];\n\n        if (elVal !== val) {\n          write = true;\n          writeCSS[key] = val;\n        }\n      }\n\n      if (write) {\n        defer(function () {\n          extend(_this8.element.style, writeCSS);\n          _this8.trigger('repositioned');\n        });\n      }\n    }\n  }]);\n\n  return TetherClass;\n})(Evented);\n\nTetherClass.modules = [];\n\nTetherBase.position = position;\n\nvar Tether = extend(TetherClass, TetherBase);\n/* globals TetherBase */\n\n'use strict';\n\nvar _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\nvar _TetherBase$Utils = TetherBase.Utils;\nvar getBounds = _TetherBase$Utils.getBounds;\nvar extend = _TetherBase$Utils.extend;\nvar updateClasses = _TetherBase$Utils.updateClasses;\nvar defer = _TetherBase$Utils.defer;\n\nvar BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];\n\nfunction getBoundingRect(tether, to) {\n  if (to === 'scrollParent') {\n    to = tether.scrollParents[0];\n  } else if (to === 'window') {\n    to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];\n  }\n\n  if (to === document) {\n    to = to.documentElement;\n  }\n\n  if (typeof to.nodeType !== 'undefined') {\n    (function () {\n      var node = to;\n      var size = getBounds(to);\n      var pos = size;\n      var style = getComputedStyle(to);\n\n      to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];\n\n      // Account any parent Frames scroll offset\n      if (node.ownerDocument !== document) {\n        var win = node.ownerDocument.defaultView;\n        to[0] += win.pageXOffset;\n        to[1] += win.pageYOffset;\n        to[2] += win.pageXOffset;\n        to[3] += win.pageYOffset;\n      }\n\n      BOUNDS_FORMAT.forEach(function (side, i) {\n        side = side[0].toUpperCase() + side.substr(1);\n        if (side === 'Top' || side === 'Left') {\n          to[i] += parseFloat(style['border' + side + 'Width']);\n        } else {\n          to[i] -= parseFloat(style['border' + side + 'Width']);\n        }\n      });\n    })();\n  }\n\n  return to;\n}\n\nTetherBase.modules.push({\n  position: function position(_ref) {\n    var _this = this;\n\n    var top = _ref.top;\n    var left = _ref.left;\n    var targetAttachment = _ref.targetAttachment;\n\n    if (!this.options.constraints) {\n      return true;\n    }\n\n    var _cache = this.cache('element-bounds', function () {\n      return getBounds(_this.element);\n    });\n\n    var height = _cache.height;\n    var width = _cache.width;\n\n    if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {\n      var _lastSize = this.lastSize;\n\n      // Handle the item getting hidden as a result of our positioning without glitching\n      // the classes in and out\n      width = _lastSize.width;\n      height = _lastSize.height;\n    }\n\n    var targetSize = this.cache('target-bounds', function () {\n      return _this.getTargetBounds();\n    });\n\n    var targetHeight = targetSize.height;\n    var targetWidth = targetSize.width;\n\n    var allClasses = [this.getClass('pinned'), this.getClass('out-of-bounds')];\n\n    this.options.constraints.forEach(function (constraint) {\n      var outOfBoundsClass = constraint.outOfBoundsClass;\n      var pinnedClass = constraint.pinnedClass;\n\n      if (outOfBoundsClass) {\n        allClasses.push(outOfBoundsClass);\n      }\n      if (pinnedClass) {\n        allClasses.push(pinnedClass);\n      }\n    });\n\n    allClasses.forEach(function (cls) {\n      ['left', 'top', 'right', 'bottom'].forEach(function (side) {\n        allClasses.push(cls + '-' + side);\n      });\n    });\n\n    var addClasses = [];\n\n    var tAttachment = extend({}, targetAttachment);\n    var eAttachment = extend({}, this.attachment);\n\n    this.options.constraints.forEach(function (constraint) {\n      var to = constraint.to;\n      var attachment = constraint.attachment;\n      var pin = constraint.pin;\n\n      if (typeof attachment === 'undefined') {\n        attachment = '';\n      }\n\n      var changeAttachX = undefined,\n          changeAttachY = undefined;\n      if (attachment.indexOf(' ') >= 0) {\n        var _attachment$split = attachment.split(' ');\n\n        var _attachment$split2 = _slicedToArray(_attachment$split, 2);\n\n        changeAttachY = _attachment$split2[0];\n        changeAttachX = _attachment$split2[1];\n      } else {\n        changeAttachX = changeAttachY = attachment;\n      }\n\n      var bounds = getBoundingRect(_this, to);\n\n      if (changeAttachY === 'target' || changeAttachY === 'both') {\n        if (top < bounds[1] && tAttachment.top === 'top') {\n          top += targetHeight;\n          tAttachment.top = 'bottom';\n        }\n\n        if (top + height > bounds[3] && tAttachment.top === 'bottom') {\n          top -= targetHeight;\n          tAttachment.top = 'top';\n        }\n      }\n\n      if (changeAttachY === 'together') {\n        if (tAttachment.top === 'top') {\n          if (eAttachment.top === 'bottom' && top < bounds[1]) {\n            top += targetHeight;\n            tAttachment.top = 'bottom';\n\n            top += height;\n            eAttachment.top = 'top';\n          } else if (eAttachment.top === 'top' && top + height > bounds[3] && top - (height - targetHeight) >= bounds[1]) {\n            top -= height - targetHeight;\n            tAttachment.top = 'bottom';\n\n            eAttachment.top = 'bottom';\n          }\n        }\n\n        if (tAttachment.top === 'bottom') {\n          if (eAttachment.top === 'top' && top + height > bounds[3]) {\n            top -= targetHeight;\n            tAttachment.top = 'top';\n\n            top -= height;\n            eAttachment.top = 'bottom';\n          } else if (eAttachment.top === 'bottom' && top < bounds[1] && top + (height * 2 - targetHeight) <= bounds[3]) {\n            top += height - targetHeight;\n            tAttachment.top = 'top';\n\n            eAttachment.top = 'top';\n          }\n        }\n\n        if (tAttachment.top === 'middle') {\n          if (top + height > bounds[3] && eAttachment.top === 'top') {\n            top -= height;\n            eAttachment.top = 'bottom';\n          } else if (top < bounds[1] && eAttachment.top === 'bottom') {\n            top += height;\n            eAttachment.top = 'top';\n          }\n        }\n      }\n\n      if (changeAttachX === 'target' || changeAttachX === 'both') {\n        if (left < bounds[0] && tAttachment.left === 'left') {\n          left += targetWidth;\n          tAttachment.left = 'right';\n        }\n\n        if (left + width > bounds[2] && tAttachment.left === 'right') {\n          left -= targetWidth;\n          tAttachment.left = 'left';\n        }\n      }\n\n      if (changeAttachX === 'together') {\n        if (left < bounds[0] && tAttachment.left === 'left') {\n          if (eAttachment.left === 'right') {\n            left += targetWidth;\n            tAttachment.left = 'right';\n\n            left += width;\n            eAttachment.left = 'left';\n          } else if (eAttachment.left === 'left') {\n            left += targetWidth;\n            tAttachment.left = 'right';\n\n            left -= width;\n            eAttachment.left = 'right';\n          }\n        } else if (left + width > bounds[2] && tAttachment.left === 'right') {\n          if (eAttachment.left === 'left') {\n            left -= targetWidth;\n            tAttachment.left = 'left';\n\n            left -= width;\n            eAttachment.left = 'right';\n          } else if (eAttachment.left === 'right') {\n            left -= targetWidth;\n            tAttachment.left = 'left';\n\n            left += width;\n            eAttachment.left = 'left';\n          }\n        } else if (tAttachment.left === 'center') {\n          if (left + width > bounds[2] && eAttachment.left === 'left') {\n            left -= width;\n            eAttachment.left = 'right';\n          } else if (left < bounds[0] && eAttachment.left === 'right') {\n            left += width;\n            eAttachment.left = 'left';\n          }\n        }\n      }\n\n      if (changeAttachY === 'element' || changeAttachY === 'both') {\n        if (top < bounds[1] && eAttachment.top === 'bottom') {\n          top += height;\n          eAttachment.top = 'top';\n        }\n\n        if (top + height > bounds[3] && eAttachment.top === 'top') {\n          top -= height;\n          eAttachment.top = 'bottom';\n        }\n      }\n\n      if (changeAttachX === 'element' || changeAttachX === 'both') {\n        if (left < bounds[0]) {\n          if (eAttachment.left === 'right') {\n            left += width;\n            eAttachment.left = 'left';\n          } else if (eAttachment.left === 'center') {\n            left += width / 2;\n            eAttachment.left = 'left';\n          }\n        }\n\n        if (left + width > bounds[2]) {\n          if (eAttachment.left === 'left') {\n            left -= width;\n            eAttachment.left = 'right';\n          } else if (eAttachment.left === 'center') {\n            left -= width / 2;\n            eAttachment.left = 'right';\n          }\n        }\n      }\n\n      if (typeof pin === 'string') {\n        pin = pin.split(',').map(function (p) {\n          return p.trim();\n        });\n      } else if (pin === true) {\n        pin = ['top', 'left', 'right', 'bottom'];\n      }\n\n      pin = pin || [];\n\n      var pinned = [];\n      var oob = [];\n\n      if (top < bounds[1]) {\n        if (pin.indexOf('top') >= 0) {\n          top = bounds[1];\n          pinned.push('top');\n        } else {\n          oob.push('top');\n        }\n      }\n\n      if (top + height > bounds[3]) {\n        if (pin.indexOf('bottom') >= 0) {\n          top = bounds[3] - height;\n          pinned.push('bottom');\n        } else {\n          oob.push('bottom');\n        }\n      }\n\n      if (left < bounds[0]) {\n        if (pin.indexOf('left') >= 0) {\n          left = bounds[0];\n          pinned.push('left');\n        } else {\n          oob.push('left');\n        }\n      }\n\n      if (left + width > bounds[2]) {\n        if (pin.indexOf('right') >= 0) {\n          left = bounds[2] - width;\n          pinned.push('right');\n        } else {\n          oob.push('right');\n        }\n      }\n\n      if (pinned.length) {\n        (function () {\n          var pinnedClass = undefined;\n          if (typeof _this.options.pinnedClass !== 'undefined') {\n            pinnedClass = _this.options.pinnedClass;\n          } else {\n            pinnedClass = _this.getClass('pinned');\n          }\n\n          addClasses.push(pinnedClass);\n          pinned.forEach(function (side) {\n            addClasses.push(pinnedClass + '-' + side);\n          });\n        })();\n      }\n\n      if (oob.length) {\n        (function () {\n          var oobClass = undefined;\n          if (typeof _this.options.outOfBoundsClass !== 'undefined') {\n            oobClass = _this.options.outOfBoundsClass;\n          } else {\n            oobClass = _this.getClass('out-of-bounds');\n          }\n\n          addClasses.push(oobClass);\n          oob.forEach(function (side) {\n            addClasses.push(oobClass + '-' + side);\n          });\n        })();\n      }\n\n      if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {\n        eAttachment.left = tAttachment.left = false;\n      }\n      if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {\n        eAttachment.top = tAttachment.top = false;\n      }\n\n      if (tAttachment.top !== targetAttachment.top || tAttachment.left !== targetAttachment.left || eAttachment.top !== _this.attachment.top || eAttachment.left !== _this.attachment.left) {\n        _this.updateAttachClasses(eAttachment, tAttachment);\n        _this.trigger('update', {\n          attachment: eAttachment,\n          targetAttachment: tAttachment\n        });\n      }\n    });\n\n    defer(function () {\n      if (!(_this.options.addTargetClasses === false)) {\n        updateClasses(_this.target, addClasses, allClasses);\n      }\n      updateClasses(_this.element, addClasses, allClasses);\n    });\n\n    return { top: top, left: left };\n  }\n});\n/* globals TetherBase */\n\n'use strict';\n\nvar _TetherBase$Utils = TetherBase.Utils;\nvar getBounds = _TetherBase$Utils.getBounds;\nvar updateClasses = _TetherBase$Utils.updateClasses;\nvar defer = _TetherBase$Utils.defer;\n\nTetherBase.modules.push({\n  position: function position(_ref) {\n    var _this = this;\n\n    var top = _ref.top;\n    var left = _ref.left;\n\n    var _cache = this.cache('element-bounds', function () {\n      return getBounds(_this.element);\n    });\n\n    var height = _cache.height;\n    var width = _cache.width;\n\n    var targetPos = this.getTargetBounds();\n\n    var bottom = top + height;\n    var right = left + width;\n\n    var abutted = [];\n    if (top <= targetPos.bottom && bottom >= targetPos.top) {\n      ['left', 'right'].forEach(function (side) {\n        var targetPosSide = targetPos[side];\n        if (targetPosSide === left || targetPosSide === right) {\n          abutted.push(side);\n        }\n      });\n    }\n\n    if (left <= targetPos.right && right >= targetPos.left) {\n      ['top', 'bottom'].forEach(function (side) {\n        var targetPosSide = targetPos[side];\n        if (targetPosSide === top || targetPosSide === bottom) {\n          abutted.push(side);\n        }\n      });\n    }\n\n    var allClasses = [];\n    var addClasses = [];\n\n    var sides = ['left', 'top', 'right', 'bottom'];\n    allClasses.push(this.getClass('abutted'));\n    sides.forEach(function (side) {\n      allClasses.push(_this.getClass('abutted') + '-' + side);\n    });\n\n    if (abutted.length) {\n      addClasses.push(this.getClass('abutted'));\n    }\n\n    abutted.forEach(function (side) {\n      addClasses.push(_this.getClass('abutted') + '-' + side);\n    });\n\n    defer(function () {\n      if (!(_this.options.addTargetClasses === false)) {\n        updateClasses(_this.target, addClasses, allClasses);\n      }\n      updateClasses(_this.element, addClasses, allClasses);\n    });\n\n    return true;\n  }\n});\n/* globals TetherBase */\n\n'use strict';\n\nvar _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\nTetherBase.modules.push({\n  position: function position(_ref) {\n    var top = _ref.top;\n    var left = _ref.left;\n\n    if (!this.options.shift) {\n      return;\n    }\n\n    var shift = this.options.shift;\n    if (typeof this.options.shift === 'function') {\n      shift = this.options.shift.call(this, { top: top, left: left });\n    }\n\n    var shiftTop = undefined,\n        shiftLeft = undefined;\n    if (typeof shift === 'string') {\n      shift = shift.split(' ');\n      shift[1] = shift[1] || shift[0];\n\n      var _shift = shift;\n\n      var _shift2 = _slicedToArray(_shift, 2);\n\n      shiftTop = _shift2[0];\n      shiftLeft = _shift2[1];\n\n      shiftTop = parseFloat(shiftTop, 10);\n      shiftLeft = parseFloat(shiftLeft, 10);\n    } else {\n      shiftTop = shift.top;\n      shiftLeft = shift.left;\n    }\n\n    top += shiftTop;\n    left += shiftLeft;\n\n    return { top: top, left: left };\n  }\n});\nreturn Tether;\n\n}));\n"

/***/ }

},[1057]);
//# sourceMappingURL=scripts.map